I’m on the autism spectrum and I harness this ability to have conversations in my mind to improve my social interactions. I simulate all kinds of permutations of events and branches of conversations. When I get the chance some of these get tested in the real world and the information I gather from that is fed in to my next round of simulations. Ten years ago I couldn’t socialise at all. Now I can pass as normal in a lot of different situations. I think I’ve managed to build up some kind of subconscious model of how other people work.
Even when I’m not actively doing this, my thoughts take the form of conversations.
Ditto for my partner. She is constantly doing exactly what you described, and has diagnosed ASD.
I wouldn't say her inner dialogue is centered reminiscing or longing, which is what the article mentions in this study about those who are lonely; more so she's constantly running a post mortem on every social interaction she remembers to build a more robust "model" about how people work.
Before she was diagnosed, this tended to veer more towards paranoia and constant second guessing of herself, and often resulted in a feeling of loneliness.
Post diagnosis she is much more comfortable with these thoughts, and has used mindfulness practice as a means to stop herself from obsessing when it goes a little too far.
Even when I’m not actively doing this, my thoughts take the form of conversations.