I think empathy is a really important thing to cultivate for a storyteller.
Like, you may not agree with a character, but on some level you gotta understand where they're coming from -- and not just in the sense of "he acts standoffish because he lost his mother when he was young," a simple cause and effect, but in the sense of, what are they feeling inside?
I don't think it's possible to write a character you don't understand and do it well. If you're just basing a condescending person on what you've seen other condescending people do, it might be accurate enough, but it's gonna ring a little bit hollow. I think you have to learn to imagine being "in their shoes," as respheal said.
I have a character who is very condescending and tends to figuratively shoot himself in the foot a lot by dissing people who could have helped him, which is not how I am at all. I'm of the opinion that you should try to be kind to everyone if you can -- heck, if nothing else, people will be nicer to you if you're nicer to them, and your life will be easier. Whereas this guy tends to be of the opinion that he owes them nothing, and treats people badly until he has reason not to. GEE DUDE, I WONDER WHY NO ONE LIKES YOU.
Dealing with someone with this attitude in real life is exhausting, but for this character I have to be able to understand it. I have to look through his eyes and see being kind for no reason as a really unfair imposition, see that would make him uncomfortably vulnerable, see the emotional walls he has up and a deep fear of being belittled that makes him quick to put others down. His actions to me aren't just "what a condescending person would do," they are a reaction to all of his beliefs and fears and experiences
I mean, it's not just friends -- I've been interacting with people all my life. There are pieces of kids from middle school or high school, or even co-workers I kinda knew, that find their way into characters. You don't have to base your shy character off of A Specific Shy Friend... you just have to have interacted with enough shy people to be able to empathise with that mindset.
The flip side is that, in a way, all of my characters are a piece of me. One character is much more reckless than I am, but he has my sense of protectiveness so I get why he's doing it. Another is shy in a way I'm not, but has a lot of my beliefs about how to treat others. One character tends to say the thing I want to say (but I know better) or does the things I stop myself from doing. All of my characters have a piece of me in them, and in that way, I can relate to all of them somehow, even if I don't always agree with where they take that.