Declare array of objects javascript