At the moment arrays become objects with indexes 0, 1, 2 etc. This isn't helpful if you then need to do things like iterate over them. This patch fixes that.
Expose arrays as proper arrays even when they are top level.
thanks! mind adding a test or two?
Add test for both empty array, and array with elements in it.
Done, I'm not sure how to run the tests though.
Use built in length assertion
Use better abstraction to check for array.
Please merge this!