Some of these are planned of course but others can crop up as you are drafting your story. One of the great joys of writing I think is when you've drafted a story and you spot other links between characters/with your theme etc., all of which have come out of your sub-conscious mind.
Reading widely in all genres and including non-fiction will help feed that sub-conscious mind which is why doing this is such a good idea for all writers, regardless of what you write.
You want to be able to draw on thoughts that have occurred to you as you read something, which you may not have noted for a story at the time of reading the piece concerned, but which come back to your mind as you write/edit etc and you realise it could fit in really well with your character.
So where to look for links then?
1. Look at links between what characters fear. Enemies can be united by a common fear of something or someone else. Those links can be played on for good or evil.
2. Look at links between what characters love. That can also be used for good or evil. If two characters love the same person, there's going to be fallout from that.
3. Look at links with regard to what makes people tick. The basic drives - the need to survive and pass on genes to offspring - are common to most of us. It is how we act on them that differentiates us of course. One of my favourite moments in Star Wars is the famous scene where Darth Vader reveals he is Luke Skywalker's father. Luke is horrified of course. The very thought of there being any link at all between him and Vader is horrifying for Luke. What links can you use to make other characters react in a similar way?