One nice option is to give class levels to monsters with a high enough Int. Everyone expects it when they run into various humaniods at high levels, but not necessarily with other creature types. Of course, this technically puts the monster into the "NPC" category, so I guess this just proves Tshern's orignal statement about only using outsiders, dragons, and NPCs.
One thing I like about NPCs is I really only have to worry about their relative threat, and not their hard-and-fast CR. For example, I had a group of PCs fighting a caster, and I wanted him to be a 7th level caster. For flavor reasons, a specialized necremancer with the dread witch PrC (Heroes of Horror) really fit the bill. The dread witch is an intersting class, but it loses a caster level, so I figured I could make an 8th level NPC that was techincally a 7th level caster. I also thought a mind bender dip would be nice for telepathy for flavor reasons, so I through in a level of rogue to make the skill requirements doable. In the end, he was a 9th level character, but two of those levels had a negligable impact on his actual power.
Long story short, I'll sometimes throw on several "pointless" levels just to boost the NPC in various ways, but run it as a character of significantly lower level. This could be as simple as throwing four fighter levels onto a wizard just to give him more HP and a better Fort save. Really, he won't be that much more potent (offensively) than a caster of equal caster-level.