cycling through an array

rzelko:
is there a way to write to an array from within a user interface?

int myArray[6];
int myArrayIndex;
/*... more code
*/
myArrayIndex = whereIWantToStoreInterfaceInput;
myArray[myArrayIndex] = InterfaceInput;
/*... more code
*/