toArray -> toArrayCopy (and is now public)