Add some basic array functions

Clean up constructor with for...in instead of for loop -- oops...