The description of Sherlock wandering through his mind palace as if it were some kind of virtual reality reminds me of what I experienced during a bad acid trip in college. If I looked at some object and tried to remember details about it I would "see" this multidimensional spatial array of all similar objects that I had in my memory with them sorted along each dimension by some attribute of the objects, and then I could "see" a search take place along each dimension to find the memory that best matched the object I was looking at. When the match was found, I could feel the data load from the memory to my awareness.
Basically, it seemed on this trip that the part of my mind that is "me" had become kind of detached from the rest of my mind and could watch how the rest worked. Another example: when someone spoke, I first would hear just nonsense sound, then I'd hear a replay but this time as phonemes, then I'd hear them replay again but this time as words, then I was aware of some kind of parsing going on and them the "me" part would be aware of the thought the speaker was trying to convey. (And this might also trigger an attempt to remember who the speaker was, which would do that whole spatial array thing I described in the prior paragraph).
I have no idea if this experience was just some random thing my brain made up due to the effects of the acid, or if it really does have some connection to how memory works and/or how language is processed.
I didn't try to do any experiments with memory perception while tripping after that, because I never dropped acid after that trip. I'd noticed that my last several trips had felt like context switched between the real world and the tripping world. When I'd trip, I'd kind of pick up where I left off in the tripping world the previous time. Since my last trip had turned bad, I was worried that tripping again would just pick up where I left off, and so never touched acid (or any other hallucinogen) again.