Your initial approach is almost there, it needs a key added in the object to yield the desired result:
key
object
SELECT species, array::group({id: id, age: age}) AS members FROM animal GROUP BY species;