Specialize toArray for performance.
Merge pull request #9 from rossabaker/master

Specialize toArray for performance.