I get nearly the same issue intermittently in my '99 7.4L. I've been shotgunning parts at it without much luck. I get P0171 (bank 1 lean) and occasionally P0174. I also get the same O2 code. My issue came up after installing new injectors. Mine runs fine most of the time and I drive it daily...
That valve applies vacuum to shutoff the flow to the heater core at the crossover valve, when you turn on max A/C. Unless max A/C is on, it should be fully open. the vacuum line should run to a solenoid on the firewall and then on to the intake. I don't think this is the issue. Make sure you...
You are correct on the third picture being the correct PCV setup. The middle section is a pre-bent plastic tube so you'll need the hole setup (tube & valve). Just spitballing, but could this be a throttle position sensor issue?