PHP-993: Merge return array of individual batches into one array

Not very pretty yet, but seems to work.