Well here is how it works on your truck. When you first start the engine, the fuel system is in an "open loop" mode. In other words the PCM adjusts fuel and timing solely based on the MAP, TPS, RPM, and coolant temp sensors. It ignores the O2 sensor(s) at this time. A closed loop timer starts counting, and when the timer runs out, (around 2 to 3 minutes depending on the vehicle). When this timer stops, then the PCM looks at the O2 sensor voltage. If the sensor is worn and lazy, then it's voltage is too high. The PCM sees this as a over rich condition and starts to lean the fuel mixture. Well it leans it so much that the RPM, start to drop. So then the PCM tells the IAC motor to open up the air passage in the throttle body (the sucking noise you hear). If you drive the truck, it runs poorly because it is too lean. Eventually the O2 sensor starts switching and all is fine until the next cold/cool start. If you have not replaced them, then I recommend doing that as your next move. From the description of your problem, I am 98% sure that this will fix it.
It is the upstream O2 sensor that controls fuel. It is in front of the catalytic converter closer to or on the exhaust manifold. The sensor behind the cat is for catalytic converter monitoring. Look again for that upstream O2. If you need, I can maybe find a picture of it for you.
Yes those vacuum lines are forXXXXXcontrol of the front axle. Engine vacuum goes to the vacuum switch on the transfer case. Then when you switch toXXXXX vacuum is sent to the actuator on the front axle which locks the hubs. If you have a corrosion or connector problem, get that fixed so that yourXXXXXworks properly.