as it is, the $cart array stays the original size and not representive of the multiple additional entires that I was after,
Actually it does reflect the multiple additional entries. You took the heart of the while loop out of play. Why did you do this????
Put //$cart = array_merge($cart, $test); back in and then just un-comment the //print_r($cart); in the while loop to watch it grow. Or add a print_r($cart); after the loop.
This (the $cart) stays the same only happens for a $groupsize = 3; or 9. Try $groupsize = 5; or 19.