Reading this the idea of "modelling" from gestalt therapy[1] came to mind. I think it's quite practical to create an internal model of another person, which can be refined over time through observation. Fringe practices like "tulpamancy" involve actually "running" such a construct, and I think, whatever the truth behind the claims of tulpamancers, there is a lot still unknown about this (see also multiple personality, or dissociative identity disorder, and of course "hearing voices" in schizophrenia).
Edit: [1] Actually it is a "neuro-linguistic programming" concept, which makes it a bit less credible. Still, the concept is clear.