Hi Hameed,
Thank you for your help. The solution didn't quite meet my needs but I have found a way to output an array through the core render. Being as it's a public function, I'm only outputting the bare minimum data without references to anything else. I'll combine paths in the layout PHP.
https://moodle.org/mod/forum/discuss.php?d=356312
Hope you find that useful.
Thanks,
Andrew