MASSIVE UNMARKED SPOILERS FOR ZERO COMPANY BELOW THIS POINT.
YOU HAVE BEEN WARNED
Trick from Star Wars Zero Company is an example of how to subvert expectations properly.
Going into the game, we know that Trick was wounded in battle and despite making a FULL RECOVERY, was slated to be sent back to Kamino as a maintenance clone until Hawks pulls some strings and gets discharged. If you look at Trick's armor and his face in game, you'll notice that a lot of damage and the wounds was done to his head. Specifically the right side of his head.
Now, what do we know about clone troopers that would cause them to be declared unfit for battle because of a head wound to the right side of their head?
Bingo, it's the inhibitor chip. It's located on the right side of their head, and it's likely that a head wound could potentially damage the chip and prevent it from functioning correctly. Which perfectly explains why the Kaminoans wouldn't want him on the front lines: there's a good chance he's defective.
Now, if you paid attention to the Zero Company trailers and the timeframe you would clearly know that ZCOM takes place during the waning days of the Clone Wars, and specifically that Order 66 occurs during the game. It's really the only explanation for why you're being shot at by a pure grey Venator, something that only came about AFTER Order 66.
Now, I'm sure you're wondering what this has to do with "subverting expectations" properly. Well, I'll get into it now.
Trick is a clone trooper and part of your squad. You also have a Jedi in your squad. You know Order 66 happens. That begs the question of how are you going to have both a Jedi and clone in your squad if Order 66 is going to happen.
Well, look at the info above. Trick makes a full recovery, but is declared unfit for combat because of a wound to the right side of his head. If you're a Clone Wars fan like I am, you probably figure that Trick's inhibitor chip is damaged and Order 66 will fail to trigger in him, or it will be a more minor version like what the Bad Batch experienced at first.
Heck, even going into the Order 66 cutscene, Trick is with you guys while Stillwatch are all spouting lines showing Order 66 has triggered. You figure Trick is still on your side since no one has said Order 66, no one has talked to Trick.
And then he just keeps standing there. And takes aim at your forces. And the only choice is to shoot his friends with the description being "good soldiers follow orders".
That's how you subvert expectations. You're going into Order 66, fully expecting Trick to be on your side. Only for them to pull the rug out from under you and genuinely surprise you by revealing the head damage and Trick's backstory were all a red herring.
Thus, when you get to Order 66, you're genuinely surprised. You think one thing's going to happen, only for something else to happen. Except in this case the something else was actually good. If Trick was just a 100% normal clone, them him betraying you during Order 66 wouldn't be a surprise at all. You'd be expecting it.
But by setting it up so that those with knowledge of the setting think that Order 66 won't affect him, they can then be genuinely surprised because the hints and foreshadowing were just red herrings allowing them to actually be surprised when Order 66 comes around.
As an aside it's pretty interesting how a clone could actually tell another clone to "execute Order 66" and then actually tell that clone to act normal until a signal is given.