I don't have imaginary friends, but I do create characters in imaginary scenarios and worlds in my mind, and yes, I often build them off of real people I've met, but didn't really get to know. Often, they encompass my ideal of a person in whatever role I've placed them in, and then I might add flaws to humanize them for dramatic element. Time to start writing a novel or something
I hear a lot of INFPs say they have "movies running in their mind" and I'd say it is something like that, not an interaction with an imagined person (I'm not crazy!!!! ).
"Charlotte sometimes dreams a wall around herself. But it's always with love - So much love it looks like everything else. Charlotte Sometimes - So far away, glass sealed and pretty." - The Cure
I internalize what I learn by imagining myself breaking it down into simple terms and explaining it to people that I know and like but that aren't particularly intellectual. I also do philosophical exploration by imagining dialogues with famous smart people (mostly dead ones). Not exactly the same as what the OP is talking about, but related I guess.