Warning: Contains philosophical ramblings, stories from my childhood, and a book report. It is also over three times as long as the article it links to (which you may wish to read first). Not that anyone actually reads anything I post here, but if you've stumbled across this somehow consider yourself warned.
Here's a story about how fictional characters we read about influence our personalities, its something I've been aware of in myself for a long time. When I realized it was happening (in 8th grade) I decided that I liked it and have made a conscious effort since to read books that offer this sort of positive re-enforcement of character traits (honestly I probably would have anyway, but I became actively aware of it while it was happening with each new book). I have an image in my head of how I want to be and act, and I've intentionally attempted to use fiction to help build up those traits in myself. It's also made me feel old. I know very little even compared to others my age when it comes to practical knowledge (cars, cooking, reading a map, etc - all things I know less about than I really should), but I've absorbed thousands of life lessons condensed and distilled into books and short stories that have had the effect of maturing my personality faster than most others (in my opinion at least). We learn and develop through second hand advice and personal accounts all the time - it's a similar principle (if more idealized than the typical real life example).
The question though is what's the best way to learn these lessons? Is it best to learn from personal accounts of your parents and friends? Is it best to learn through personal experience? Are fictional accounts equally or more effective? In my opinion, they can all be equally effective in conveying life lessons - but quantity and quality matters. Fiction has the singular benefit of being custom tailored in every respect and there is also a virtually unlimited quantity of it; however, if it isn't realistic in how the lesson is delivered then it will fall flat (I should clarify here that most of the time no actual "lesson" per say is intended, but that doesn't stop us from learning from the experiences of a realistic character). Personal experience has the downside of having to screw up before it kicks in, and it's possible to take the wrong meaning from the lesson ("Got arrested? Well you better not get caught next time.") - most importantly there is no one to serve up a neatly packaged moral for you to digest or tell you how it all works out in the end, so if you don't figure it out by yourself nothing good will come of it (if you do though, it will stick better than anything else). Finally personal accounts lack in quantity, but are fairly well targeted, from a known trustworthy source (or potentially known untrustworthy source), and you can't get more realistic.
My parents raised me on stories of how they screwed up as kids (it was my favorite bedtime story request as a small child) - I credit that with forming the core of my personality at a young age, and I credit the shear quantity and quality of the fiction I read with much of the refining it has undergone since. Those, combined with an offhand comment my mom made when I was very young have literally defined my life to date (I was doing something cute - pretending to be a turtle I think - and she told me, half joking, that someday when I was a teenager I wouldn't be "a good little boy that loved her and did what she said anymore", and I was so horrified by this that I immediately promised myself I'd never be like that and set off to prove her wrong. It took me years to realize the irony, but it also worked better than anything else she could have done... Also, as you may have noticed, I'm still pretending to be a turtle).
Anyway... back on subject.
The article gets it wrong on one point, or at least not exactly right: Reading about a likable but evil or flawed character isn't going to make you more like the parts of them that are undesirable unless those are traits you value in yourself. Instead, you'll see yourself in the traits you share with them, and be all the more repulsed by their defining flaws (if you empathize with a character that commits a murder, your empathy makes the sense of betrayal, disappointment, and horror you feel over their action only serve to push you further away from that sort of action). If you're familiar with the concept of the "Uncanny Valley" - this is the equivalent in novels (fiction and non-fiction: read "In Cold Blood" by Truman Capote). It's like looking at a twisted reflection of your personality that's almost but not quite right, and that wrongness is all the more unnerving for it. At a bare minimum these characters will force you to think about yourself in the context of their actions, which will tell you more about who you are as a person - knowledge you can use to choose who you want to become. This is also why villains we are able to relate to are so much better characters than the classic pure evil no redeeming qualities force of nature type villains that used to be so prevalent. Those characters existed only as obstacles for the protagonist to overcome, rather than as a story in and of themselves.
Consider the book Tigana by Guy Gavriel Kay. This book is the one I bring out every time I want to give an example of the best villain in fantasy fiction - Brandin, King of Ygrath. His motivations are entirely human and understandable, and If the story was told from his eyes he would be the hero. The entire premise of the story is based on the death of his son at the hands of the army of a land he was trying to conquer. He and his son were the aggressors, but so grief stricken was he that spent the rest of his life dedicated to getting revenge for his son's death - forsaking his kingdom and the rest of his family to do so. He's doomed to fail from the first chapter of the book, because it is a book, and all the reader can do is watch as this heartbroken man gives up everything, is betrayed by everyone close to him, and is ultimately killed by those who killed his son. For the villain, Tigana is a tragedy, but for the heroes it's a story about freeing their people from decades of oppression by a tyrant who conquered them and wiped out every hint of their history and culture. Can we as readers blame a man for reacting in that way towards the people who killed his son? Yes, we can, because he was the aggressor - he started it and so it's his fault we say. That's our excuse, that's how we're different from him. But still it makes you think, would you make that distinction if you were in that position? Perhaps instead you'd blame the one who killed him, because to do otherwise would be to admit that you were responsible for your own son's death - and that would be too terrible to live with. Perhaps you'd express the guilt you refuse to admit you feel at yourself in the form of rage and an overwhelming desire for revenge against any other possible targets. Your other options are despair and insanity. Forgiveness isn't and option. You can't forgive yourself and move on when you wont accept the blame.
That's not fiction - it happens every day, though usually on a smaller scale.
Tigana is a lesson to everyone that relates to the character of Brandin, and almost everyone will. What you'll get from it will be different than what I got from it, and that's how it should be - he embodies an aspect of all of us but nobody works in exactly the same way and so the lesson will change to suit the person. It's not so much what you get out of it that matters, it's that you recognize him in yourself and internalize that knowledge - putting a check on any thoughts and actions you associate with him because you saw where it led him. Whereas good heroes are positive re-enforcement for behaviors, encouraging you to behave in specific ways; Villains are negative re-enforcement, discouraging types of behavior. Anti-heroes can actually accomplish both roles; or either. However, none of that will be against your will or nature - the lesson you get will be complementary to your existing values, and the only way those will change is if the plot or actions of the characters logically or emotionally convinces you that they need changing - unlikely unless you're young and haven't yet solidified them (and then, usually not a bad thing - most books for kids are written with this purpose in mind).
The last thing I'll say about Tigana is this - while I do bring it out to showcase Brandin all the time, he's only one of two villains and a half dozen heroes in that (fairly short) story. It's a true work of art, and reads like poetry.
What both this essay and the article boils down to is that yes, we are what we read to a great extent - that is intentionally done by authors when they write books. It makes things more interesting to people if they can relate to the characters - it doesn't work as well in film because we have less details to flesh out the character and we typically can't see inside their head. However the side effect (sometimes primary effect) is that just by reading about these people we learn more about ourselves and consciously or unconsciously build upon our own personalities and experiences with those of characters who have traits we value. We idolize some of them as role models because they were made to fit that role. Likewise we repudiate others for their actions that we deem evil, wrong, and unjust - yet we still see aspects of ourselves in them or we would not feel the need to distance ourselves from them and rationalize our differences (excluding the aforementioned force-o-nature types that aren't really characters). Still others we see rise and fall, make mistakes in good faith and lie out of necessity. We see ourselves in them most of all, and they are the hardest for us to deal with because they strike so close to home - we wince in embarrassment when they make fools of themselves and then think about how we would have "just crawled into a hole and died right there" if we had done that instead of them, but they go on, and so do we. Hero or villain or average joe, we learn something about ourselves from all of them, and in doing so we don't gradually become a different person - we become more of what we already are.