As part of my regular reading, I get books about people and why they do things. Some of those books are about environments I've worked in. My latest book on the subject is Office Politics by Guy Browning.
I read them partly because people interest me (Can you really tell what a student is like just by looking at their room?), but also because it helps me build real characters. The deep psychiatry books, such as 'The Man Who Mistook His Wife For A Hat' by Oliver Sacks, take some reading but are well worth the effort. Lighter books, such as 'Outliers' by Malcolm Gladwell are easier to read but no less useful.
After all, what's the point of building a beautiful world with accurate costumes and weapons if the characters are flat and unbelievable.
All of this knowledge, naturally, takes time to build. But if you want to create three dimensional characters without using your friends, family, co-workers and enemies as base line models, it's very useful. My current reading is helping me create characters for an office environment...and reminding me why I don't want to work in an office anymore.
Should you use other literary characters as a base line for your own? Up to you. Personally I feel they can be a great starting point, but if you rely too heavily on those characters, then your own creation will look like a pale shadow of them.
Read books about people and study people if you want to create real characters.
There you go, I've given you an excuse to buy more books.