Probably these. Which is dumb because if they was being parallels then it's backwards.
You must be registered for see images
You must be registered for see images
That's partly because of her subconscious memories and partly because of her obsession with Hagoromo and Hamura.
She was sealed away by her own two sons. The word two is important. When Naruto and Sasuke faced off against Kaguya, two people were ready to seal her again.
This caused her subconscious or dormant memories to resurface and caused her to identify Naruto with Hagoromo and Sasuke with Hamura. Her obsession with Hagoromo and Hamura was also important. Her obsession led to her past memories to make a connection with the present.
However both Naruto and Sasuke are related to Hagoromo, Hamura is completely absent (A shame that Kishi didn't keep Hinata or Neji around) and Kaguya confirms this when she says that Naruto has Ashura's power and Sasuke has Indra's power.