How do I wire a switched outlet with the switch downstream?
Only if you either have only one outlet or have 3 conductors all the way between the feed and the switch. Notice in your top diagram that there isn't a neutral going to the switch - it is being used as a switched hot. If you have more than one outlet, you need to find a way to get a neutral beyond the first one. See below - ground and boxes omitted for clarity (feed is from the left):



If there is only one outlet between the feed and the switch, you just wire it like your top diagram with the outlet as the "light".