In terms of fiction to engage an audience you need a contrast of characters, at the very basic level you have your hero(ine)/villian to drive the plot, though I use those labels loosely, after all there are many stories without an out and out good guy/bad guy. I however think the best example of contrast comes from characters on the same side heading for a similar goal.
When I did Murder in the Manor all of the characters sort of worked toward the same end, who gets the Lord of the Manor’s inheritance. Each character has their suitability questioned in terms of behaviour: amoungst the characters we had a drunken daughter, a womanising nephew, a daughter with an investment plan etc… of course the ultimate twist being the murderer’s plan to bump off his rivals was pointless as the Lord of the Manor leaves his money and estate to his loyal staff.
When it comes to character writing I tend to pair up characters:
Arthur is a debonairly dressed well spoken character who has a rather high opinion of himself and is rather ruthless, but that is a contrast in itself as despite the outer dressing he is something of a socialist and has a high moral compass.
Dr. Webster is mild mannered, a bit scruffy and very empathic and thus Arthur is a perfect foil for him. He reigns in Arthur’s more extreme aspects and Arthur challenges him personally and emotionally. However Dr. Webster has a much more dangerous side and is quite willing to use medical double speak to frighten answers out of people.