[js] arrays: support array_length_get for objects that aren't real 'arrays'