I'm writing a simple Dom script and trying to figure out the best approach.

Correct me if I'm wrong but essentially jquery works with an array like object. So for instance if we had a collection of list items the object instance would end up looking a bit like this.

Code:
{ 
[0] : htmlElement,
[1] : htmlElement,
[2] : htmlElement,
[3] : htmlElement,
[4] : htmlElement,
length : 5
}
I would be tempted to go with an array instead.

Code:
{ elems : [htmlElement, htmlElement, htmlElement, htmlElement, htmlElement]
}
I mean to create our array like object from a htmlcollection for example getElementsByTagName('li') we have to go through something like the following.

A method on the prototype
Code:
function(obj) {
var clone = type(obj) === 'array' ? obj : [].slice.call(obj);

clone.unshift(0, clone.length);
[].splice.apply(this, clone);
}
I know that one benefit is that you don't need an accessor, so you can get to an item with object[x], but are there any other benefits. The array just seems to me to be easier to work with.

I hope the above makes sense.

Thanks

RLM