Added array support

I really like this library and, as requested in #1, it was a shame it didn't have array support. So here it is! :)

Unfortunately, it needed a major rewrite, but all tests are passing.

I'm not very experienced with JS, so all criticism is welcome.

Thanks!