Without knowing more about your situation, the easiest way to do this is:
return array_merge($dataobjects->toArray(), $pages->toArray());
To display above in the template, you, of course, will need to wrap this in another ArrayList.
Updated: if you want to group lists (this, of course, is why you used GroupedList in the first place), you will need to do this before merging the arrays. More like:
return array_merge($dataobjects->GroupBy('Author')->toArray(), $page->GroupBy('Author')->toArray());
source share