How have you defined your Node template? Do you have a Binding on TextBlock.text to the “text” property of the node data? (There are lots of examples of this throughout the samples.)
If so, then you just need to do something like:
var arr = myDiagram.model.nodeDataArray;
for (var i = 0; i < arr.length; i++) {
var data = arr[i];
myDiagram.model.setDataProperty(data, “text”, “aa” + i);
}