Generate a list of index values that point inside the bone array. So the values that are output are either bone or curve numbers. The number indexes inside the array returned byGetBoneNames(). The indices are a continuous array, with each padded group concatenated. If we have two groups, like: ['UpperArm_L', 'Clavicle_L', 'Spine3'], ['UpperArm_R', 'Clavicle_R'] then this method will output something like: [10, 11, 8, 15, 16, 16]. Where each number is the index inside our bone list. As you can see there is one value (number 16) that is repeated. This is because for every group we will output the same number of items. We find the maximum group item count, using CalcMaxGroupItems() and output number of values for each group. We simply repeat the last number one or more times if we have to pad the item count of that group. This is why the number 16 is repeated two times.