Buffy The Vampire Slayer is by all accounts one of the best-written shows in the history of TV. My favorite episode: Hush, which has almost no dialogue. Joss Whedon heard dismissive praise for his dialogue, got mad, and decided to demonstrate the difference between good dialogue and good writing with a near-silent episode featuring voice-stealing demons. Like any successful TV show, Buffy had a standard episodic formula, and everything else in the episode adhered to the formula. As usual, there's awkward romance, a final battle just minutes before the end of the show, and Buffy asking Giles questions. There just isn't any dialogue. The episode works beautifully without it.
Where Buffy is a show about a vampire slayer, Supernatural is a show about a pair of demon hunters. It too has a house formula, which basically consists of ongoing interpersonal tensions and a predictable rhythm of story events. Supernatural features several episodes like Hush; the best is Changing Channels. In Changing Channels, a trickster god traps the demon hunters in a series of ridiculous universes based on a sitcom, a hospital soap opera, a cheesy cop show, and a Japanese game show, complete with a ball-punching machine which punishes contestants who answer questions incorrectly.
The most formulaic show I watch, by a landslide, is Castle, a light-hearted detective show (or as they're known in Los Angeles, a police procedural). You could set a clock by its formula; in fact, I just about do. I mostly watch TV on my Apple TV, and sometimes when I'm watching Castle, and the plot's complex enough that I'm not sure who the murderer is, if the protagonists think they've caught the murderer, I check the time on the video file to find out if it's the real killer or another red herring.
Like these other shows, Castle has a wildly variant episode. It's set mostly in 1947. As with these other shows, the variant episode sticks precisely to the show's formula, unfolding a crime investigation, with the same mistaken accusations of murder occuring at exactly the same moments as they occur in every other episode, with the same romantic tension between the two leads, but with the formula's key pieces split evenly across eras. You can find the killer in 1947 or 2012, it really doesn't matter; what does matter is that you find the killer at approximately 43 minutes into the show.
The X-Files did the same thing with their time-travel episode, and also did something similar in a vampire episode, where they kept to the usual rhythm but turned the story into a comical, supernatural version of the Rashomon thing, where every character's version of what happened is different.
A few years ago I watched a DVD of Joss Whedon speaking on screenwriting. He took time to praise formula and genre. A lot of people decry TV as formulaic, but I think Whedon's praise was dead on. In all these shows, rigid adherence to formula allowed the writers to change elements which you wouldn't expect a TV writer to be able to change. Castle and X-Files changed the characters and the setting, Supernatural briefly became every other genre (and changed the opening credits to fit), and Buffy threw out dialogue.
(Actually, like X-Files and Supernatural, Buffy did this more than once.)
All of these shows function as popcorn entertainment. None of them have pretensions to high art. But each of these episodes is a very successful artistic experiment, and none of them would have succeeded without adhering to their respective formulas.