The multiple roles of JavaScript objects and arrays