If the areas you are mentioning are in a wet or damp location, and I would consider a basement in some cases to be wet and damp, then Art 384-17 (1999 Code) refers you to Art 373-2(a). That requires a 1/4" airspace between the enclosure and the wall.
Our company specs require a unistrut channels run vertical behind the panel. This allows busbar cooling by venting the air upward as in the chimney effect. It also eliminates the possibility of moisture buildup on the back side of the enclosure.