For something like this, I like to add a subscription to my observableArray that takes one pass through the array and properly sets the "index".
Here is an extension that would work for your use case:
ko.observableArray.fn.withIndex = function(prop, startIndex, lastIndex) {
//by default use an "index" observable
prop = prop || "index";
//whenever the array changes, make a single pass through to update the indexes
this.subscribe(function(newValue) {
var item;
for (var i = 0, j = newValue.length; i < j; i++) {
//create the observable if it does not exist
item = newValue[i];
if (!item[prop]) {
item[prop] = ko.observable();
}
//special logic for the last one
item[prop]((lastIndex && i === (j - 1)) ? lastIndex : startIndex + i);
}
}, this);
return this;
};
You would use it like:
myObservableArray.withIndex("Position", 1, 99);
Here is your updated sample: http://jsfiddle.net/rniemeyer/HVNUr/