Musicals are by nature theatrical meaning poetic meaning having to move the audience's imagination and create a suspension of disbelief by which I mean there's no fourth wall.
Sometimes a character is really based on research that you do. Other times it's just based on your imagination or perhaps your conversation with the director. Or sometimes all of the above. It depends on the movie and character.