I'm trying to figure out how to replace the values 1,2 and 3 inside this GUI with a range of numbers based on a simple number of objects in an array so that it dynamically tracks it without the need for a hardcore in every update of the array. 
What prevents me from simply using the array with the numbers themselves is that each of the numbers is an object inside this GUI. The line of code is this.
gui.add(data, 'system', {
"1": 0,
"2": 1,
"3": 2
})
Suppose I use any random array containing any random information, for example:
var arr = [];
for (var i = 0; i<51;i++){
arr.push("element");}
51 , , , , "1", "2", "3", "4", "5", "6" ( 10, 1 ) , . , , 10, , 51 , , 6, .
? . . FIDDLE
EDIT: , . 1,2,3, :
gui.add(data, 'system', {
"1": 0,
"2": 1,
"3": 2
}).name('system #').onChange(function(value) {
updateSets(value);
});
, , , "1", "2", "3", (, 3 ) . 51 , 51 , 10, 6. 5, 1.