added toArray support for collection record