void ExpandIndexedVariableTableAndSet(int index, object value)
{
object[] oldArray = this.indexedVariables;
int oldCapacity = oldArray.Length;
int newCapacity = index;
newCapacity |= newCapacity.RightUShift(1);
newCapacity |= newCapacity.RightUShift(2);
newCapacity |= newCapacity.RightUShift(4);
newCapacity |= newCapacity.RightUShift(8);
newCapacity |= newCapacity.RightUShift(16);
newCapacity++;
var newArray = new object[newCapacity];
oldArray.CopyTo(newArray, 0);
newArray.Fill(oldCapacity, newArray.Length - oldCapacity, Unset);
newArray[index] = value;
this.indexedVariables = newArray;
}