your MAF has a map built into it so I would rule out that mechanic's decision. The Mass Air Flow meter has 3 wires that are for strictly intake, and 2 are conjoined to it for manifold absolute pressure (meaning altitude change like a BARO sensor, just modernized).
If it really is a p0641 powertrain code, then a MAF nor MAP sensor is not the cause, that particular code shows up as an open in the circuit on the PCM. So I would start pointing at the PCM side having the open than just replacing sensors. You may have a faulty PCM or a wire is not connected properly to the Control Module (pigtail hanging out, wire is cut).
2009 Cobalt LS XFE U74
Mods: K&N Typhoon Intake, Option Cat-Back Exhaust, Cosmo Short shifter, Maxxim Ahead 17X7's, MPx shorty antenna, FE5 Strut/shocks, Tein S Techs, Moog endlinks, Moog spring seaters, ZZP shorty header, LSJ downpipe, LNF front grille