Thanks for the replies.
Khen1950fx, your approach looks like it would do what I want, apart from if you take a look at my original code then it's actually building a hierachy so ListOfContact contains Contact which then contains all the other values, so I'm not sure it's as simple as just creating an array of each. Unless perhaps I can create an array of the parameters under Contact and then use that array as the Data->value of Contact.