Implement specs for helpers.toArray()