I will answer based on the early buddhist texts.
Memories & thoughts are perceived [sanna] and that due to contact at mind-base, contact therein is between that which is called "consciousness,
mind or intellect" and ideation.
The Blessed One said, "What is the All? Simply the eye & forms, ear & sounds, nose & aromas, tongue & flavors, body & tactile sensations, intellect & ideas. This, monks, is called the All.  Anyone who would say, 'Repudiating this All, I will describe another,' if questioned on what exactly might be the grounds for his statement, would be unable to explain, and furthermore, would be put to grief. Why? Because it lies beyond range." https://www.accesstoinsight.org/tipitaka/sn/sn35/sn35.023.than.html
The intellect disintegrates. Ideas disintegrate. Consciousness at the intellect consciousness disintegrates. Contact at the intellect disintegrates. And whatever there is that arises in dependence on contact at the intellect — experienced as pleasure, pain or neither-pleasure-nor-pain — that too disintegrates."Insofar as it disintegrates, it is called the 'world.'" https://www.accesstoinsight.org/tipitaka/sn/sn35/sn35.082.than.html
Ideation is conceived & perceived by mind which arises as one thing and ceases as another.
what's called 'mind,' 'intellect,' or 'consciousness' by day and by night arises as one thing and ceases as another. https://www.accesstoinsight.org/tipitaka/sn/sn12/sn12.061.than.html
Sankhara is that which creates mind as mind, ideation as ideation, mind-base as mind-base.
“And why, bhikkhus, do you call them fabrications? ‘They fabricate the conditioned,’ bhikkhus, therefore they are called fabrications.
And what is the conditioned that they fabrications?
They fabricate conditioned form as form;
they fabricate conditioned feeling as feeling;
they fabricate conditioned perception as perception;
they fabricate conditioned fabrications as fabrications;
they fabricate conditioned consciousness as consciousness.
‘They fabricate the conditioned,’ bhikkhus, therefore they are called fabrications. SN 22.79
Contact is requisite condition for feeling, what is perceived that is also felt, what is felt is also cognized, these [feeling, perception & conciousness] are conjoined.
"Feeling, perception, & consciousness are conjoined, friend, not disjoined. It is not possible, having separated them one from another, to delineate the difference among them. For what one feels, that one perceives. What one perceives, that one cognizes. Therefore these qualities are conjoined, not disjoined, and it is not possible, having separated them one from another, to delineate the difference among them." https://www.accesstoinsight.org/tipitaka/mn/mn.043.than.html
Felling, perception & consciousness are also conjoined with Sankhara because that which is felt and to that extent cognized & perceived, that is likewise also generated.
Three aggregates are conjoined with consciousness. The aggregate of form is not conjoined with consciousness. The aggregate of consciousness should not be said to be conjoined with consciousness or not conjoined with consciousness. https://suttacentral.net/vb1/en/thittila
Therefore thoughts & memories are included in aggregates.