Uncommented toArray method.