Would the CIV IV AI leave a defensive unit like an archer in the city to defend. Yes. Does CIV V? No, it walks them into the open and gets them killed. This is the simplest city defence tactic and the AI doesn't know it.
It's even more powerful in Civ V because the archer won't even have to defend itself. All attacks on the city tile are defended against by the city. The AI should really use this. Free attack for the city tile. (Yes, in Civ IV you can have multiple units in there instead, my point is the difference between no unit and an archer is much more significant in Civ V.)
On the upside, I've seen it use the same tactic with ships in cities. So it could well be it's only moving units out of cities so it can rush-buy (even if it doesn't actually buy anything).
Would the CIV IV AI walk units randomly into your territory. No, it used stacks of doom with a good unit composition or put troublesome forces into defensive terrain. Does CIV V? Yes, single units walk into your territory with no hope of killing anything ever.
To be fair, it only does that when it thinks it has no other option. It's still stupid. But if the AI has enough units, it'll usually send a large front of units. That it often puts the weakest (ranged) units first is another issue though. There's also a problem when the AI has too many units, and doesn't know how to move them anymore, but I've only ever seen that happen on archipelago maps (because expanding to other islands seems to be very unattractive to the AI) and on very late game screenshots.
I think the AI could be greatly improved just by adding some simple rules for things it shouldn't do, e.g. if there's only going to be one unit in the army, call off the attack.
Would the CIV IV AI walk units around with a poor unit mix? No, it would always stack units so they had multiple defences. Does CIV V? It's not such an issue but I've never seen the AI use its unit mix to any advantage.
At least I don't see AI melee units protect ranged units. Sometimes it happens, but I think this is accidental because, most of the time, the AI just tries to attack with a randomly laid out blob. E.g. if it has swordsmen and cannons, the cannons are first to go in about as often as the swordsmen, at least from my experience.
This could be a bug though, even something simple like path finding could break this, so let's see what happens.
Would the CIV IV AI preserve its units? Generally yes, a stray unit would fix itself in a hilly forest for years and make you pay to remove it. Does CIV V? No, and it's terrible mistake as units are more precious.
I've seen it do this, but it's no longer viable to just park a unit in a hilly forest as movement speed has been increased. The AI should probably pull them back into their own territory where it heals faster if it's outside the AI's borders.
It also doesn't seem to have any interest in protecting its workers. Although that has become harder, since it can't just move all of them into a city anymore, so maybe it just doesn't know how to deal with this once it has a civilian (e.g. a general) in the nearest city.