PHP has a useful array_chunk function: it is used to split an array into a number of smaller arrays ('chunks') of a size you specify, which are returned to you in a new array (i.e. an array of arrays).
ProcessWire doesn't provide a method for WireArrays that is the equivalent of array_chunk, but we can add a new method for this in hook. In /site/init.php...
// Add a new 'chunk' method to WireArray, the equivalent of PHP's array_chunk
$wire->addHookMethod('WireArray::chunk', function(