Big thank you to @harshil1712 and Ivan for their video on how to use Javascript in n8n. It really furthered my understanding of data structures, the flexibility of the Set node and power of the Function node.
Sharing some concise notes on the topic for other it may help: Understand Data Structures in n8n | RoughlyHow
I welcome feedback if there are any inaccuracies or misunderstandings in my notes!