Hi. They can be both. Most dreams are metaphors. Real visitation are still not explained but their impossibility is also not explained. There is a lot of mechanism i could see could allow them as space and time are only illusions. Another type of visitation is like having multiple personality. You can internally simulate another person quite well if you know that person well enough (that double can only know what you already know but may come to conclusion you would probably not come out with so the mind might use them to solve deadlocked problem).