function positivifyIndices(indices, maxIndex) {
    var parentLength = maxIndex + 1;
    var positiveIndices = [];
    var i;
    var index;

    for(i = 0; i < indices.length; i++) {
        index = indices[i];
        if(index < 0) {
            positiveIndices.push(parentLength + index);
        } else {
            positiveIndices.push(index);
        }
    }
    return positiveIndices;
}
Wrap negative indicies to their positive counterparts.

@param {Number[]} indices An array of indices
@param {Number} maxIndex The maximum index allowable (arr.length - 1)