There is no separate IAT connection for the 6. The MAF and the IAT reside in the same housing. As mentioned, verify that the MAF sensor is properly connected.
The CEL(s) most associated with intakes and the 6 are the following:
P0171 Fuel trim system (RH) too lean ON 2 Fuel and/or
P0174 Fuel trim system (LH) too lean ON 2 Fuel
The greater volume of air that intakes bring into the engine creates differences in the Long Fuel Trim and the Short Fuel Trim. When the ECU detects a large enough difference, these codes are triggered. Yes, the engine is running more lean, but that's the idea given the AJ engine runs pig rich (see AFR in the attachement). Measured AFR's of 6's with Injen intakes show that the lean condition is nowhere near dangerous destructive levels. Past UOA's indicated normal wear even with these CELs, therefore the these CELs are relatively harmless. I suggest either investing in a scanner to regularly check and clear these CELs. Either that or get the Injen fix from
CP-E.
P1410 VAD control system circuit malfunction OFF 2 Other
This is a pending code that gets triggered when another CEL is triggered. Basically this code informs us that the green plug connection to the VAD flapper on the airbox is not connected. Just a bit of background, the VAD flapped is a flap that opens on the airbox at higher revs for greater air. As you mentioned, your friend has this plug unconnected. Here's a pic of the VAD connection with the stock airbox:
To resolve the P1410 CEL code so that it never shows up again:
1. Verify that the CELs are what I mentioned and not related to something else. Turn off car and disconnect negative battery terminal.
2. Hopefully you saved the airbox. Remove the brass VAD solenoid from the airbox (the part to the left of that circle).
3. Remove the hoses from the solenoid.
4. Reconnect the green plug to the solenoid.
5. Using zip ties, zip tie the solenoid to somewhere out of the way.
6. Reconnect negative batter terminal. Clear CEL codes that I mentioned.
BTW, you might want to read up on this article from Mazda6tech, especially the part about protecting the ABS brake harness:
http://forum.mazda6tech.com/viewtopic.php?t=25
N.B. Photos courtesy of Mazda6tech.com