This isn't particularly special, except that without the computer science courses I've taken over the past year, I didn't know how to do it. If you've seen something like this before, I'd appreciate references (since I didn't know what to call it).

The Map constructor creates a hashtable for JavaScript.

Code:
/**
 * An ObjectRange is nothing more than a structure containing objects in order,
 * and specifying indices of an array for which those objects appear.  For
 * instance, if I want element A to be at indices 0 through 2, and element B to
 * be at indices 3 through 5, I might ordinarily declare an array like this:
 *
 * [A, A, A, B, B, B]
 *
 * This would be inefficient, though.  It would be more efficient to call
 * something like:
 *
 * oRange.insert(0, A);
 * oRange.insert(3, B);
 * oRange.insert(6, C);
 *
 * oRange.getItemAt(2); // returns A
 * oRange.getItemAt(5); // returns B
 * oRange.getItemAt(7); // returns C
 */
function ObjectRange() {
    this.__indices__ = [];
    this.__items__ = new Map();
}
ObjectRange.prototype = {
    __validate__: function (index) {
        if (typeof index != "number")
            throw new Error("index must be a number!");
    },

    __getHiddenIndex__: function(index) {
        // Binary search.
        var first = 0, last = this.__indices__.length, mid;
        while (last > first) {
            // Thanks to http://jsperf.com/code-review-1480 for this tip.
            mid = (last + first) >> 1;
            var midValue = this.__indices__[mid];
            if (midValue > index)
                last = mid;
            else
                first = mid + 1;
        }
        mid = (last + first) >> 1;
        return mid;
    },

    /**
     * Insert a value.
     *
     * @param index {Number} The index to insert at.
     * @param obj   {Any}    The object to insert.
     */
    insert: function(index, obj) {
        this.__validate__(index);
        var hiddenIndex = this.__getHiddenIndex__(index);
        if (this.__indices__[hiddenIndex - 1] !== index) {
            this.__indices__.splice(hiddenIndex, 0, index);
        }
        this.__items__.set(index, obj);
    },

    /**
     * Get the item at a given index.
     *
     * @param index {Number} The index.
     *
     * @returns The item.
     */
    getItemAt: function(index) {
        this.__validate__(index);
        var hiddenIndex = this.__getHiddenIndex__(index);
        // Reduce by one to get the item before our insertion point.
        var actualIndex = this.__indices__[hiddenIndex - 1];
        return this.__items__.get(actualIndex);
    }
};