fixing array.length only when array of objects

cc @ianstormtaylor for review
I think we should basically just handle the e-commerce case of arrays of objects, since that's the case we're trying to fix. that is a much nicer notation though, i'll fix that!