Add toJSON method to collections

Simple enough to return `toArray`, and would definitely be safer.