I assume you are asking about how non-energised dhamma are converted to energised dhammā in mind and where is RūpakKhanda. If so, This is explanation.
The mystery is in mechanism of recalling memory.
RūpakKhanda is not stored, it is generated as needed from other four aggregates.
When memory is recalled, RūpakKhanda is regenerated from four aggregates stored in kamma bhava.
And this process of recalling involves energy. So, that is why dhamma comes to mind as dhammā.
p.s.
Kamma bhava = viññāṇa dhatu = non-energised-permanenet mental aggregates (four components of PañcakKhanda other than RūpakKhanda) + energised kamma bīja/kamma viññāṇa
You can view summary of this whole topic (aggregates, dhatu, four ultimate realities, PañcakKhanda, memory, kamma etc) in table format in pdf file shared in following reply on forum.