The Simpsons - what's the reference?

There’s something I’ve seen in an episode of The Simpsons, which I’m sure must be a reference to some other TV show. It’s from the episode The Monkey Suit. A few times in that episode there was a scene change where the picture changed into a jigsaw puzzle and vanished from the screen piece by piece. I’m guessing this is copied from some sort of detective show, but not one I know. Can anyone identify it? Also a couple of times some character was revealed to be Nelson in a rubber mask. Same show?

Mission: Impossible (at least for the rubber mask bit). Maybe Get Smart for the jigsaw puzzle (although that may have been MI as well - I’m really not sure).

The Prisoner; never seen it, but heard of it. There was a whole Simpsons episode based on that.
Possibly,Murder by Death. It has a peeling-off-rubber-mask scene, though I suspect it’s derivative.

ISTR that a lot of those Quinn Martin shows from the 60s/70s would have that style of cutting, or something similar at any rate.

“Act 3: Valley of Danger!”

The Wikipedia article on the episode says that the unmaskings and the puzzle piece fadeouts are from The Saint TV series but offers no cite for it.

I haven’t seen the Simpsons episode of the OP, but I just finished watching the entire Prisoner series on DVD (oh, and I stayed at a Holiday Inn Express, too).

There is a Very Important Scene in the Prisoner that involves a monkey and a rubber mask–i.e., one that, depending on the context of the Simpsons episode, could be a direct reference to the Prisoner. I don’t want to be more explicit, since it could be a huge spoiler. I’ve seen the Prisoner end up on the Simpsons a few other places as well.