Add an explicitly intish-casting variant of collection::toArray