For displaying datas I use allways my template-system xett. You can display nested arrays in nested Templates. Initialy written for displaying events in calenders, the latest release can display all sort of nested datas.
You can have different projects and for each project different actions (services). The templates and project include files (getdatas.php, onsavedatas.php) are organized as files in a folderstructure.
for example you have a project scool.
the snippetcall could be
[!xett? &project_path=`scool`&service=`pupils_list`&canedit_webgroups=`editors`!]
then in your projectfile you can have
//first get the arrays $classrooms and $pupils with modx->dbApi
//then store all that in the array $xettdatas
$classrooms['innerrows']['pupils']=$pupils;
$xettdatas['innerrows']['classrooms']=$classrooms;
in the Template xetouterTpl.html you can have:
[+xett.innerrows.classrooms+]
in the Template classroomsTpl.html:
[+xett.row.teacher+]
[+xett.row.roomsize+]
<table>
[+xett.innerrows.pupils+]
</table>
in the Template pupilsTpl.html:
<tr><td>[+xett.row.name+]</td><td>[+xett.row.age+]</td><td>[+xett.row.adress+]</td></tr>
It can also process formdatas and so on. This is only a very easy example.
There is al lot of code for displaying calenders and so, you can remove if not needed. The coming release has also a cache-class included, so I can cache different month-views for example.
Here on my Testsite you can see one example:
http://www.meine-goldschmiede.de/testmodx/index.php?id=1122