It's not the best coding practice to want to return TWO arrays when an array of arrays will suffice.
Just :
return array($array1,$array2);
Then:
$stuff = function();
$array1 = $stuff[0];
$array2 = $stuff[1];
There's probably a simpler way to do it 😉