Thanks @Hyperbytes, that's an excellent tutorial. I am still a little unsure as to how I can cycle through data and create records in the array which each contain arrays within them. Does that make sense?
To add some context, I want each record (Title and Charts) to be a chart on the front end. And then each chart will contain any number of sub-records (QuestionShortText, Myscore, Ref1Score, Ref2Score, Ref3Score). So the front end will repeat through the records creating a chart each time.
Does that make sense?
Edit: thinking about your question, I think Object is the way to go. Do you agree?
However, whether it's array or object, how do I actually populate it? What's the process involved?
For the chart values not sure about your case but maybe you would need an array with values?
To create an array in the server action use repeat step with setvalues inside:
For object use a group step with setvalues inside. Then pick the repeat (or group) depending on your use case: