for loop and array

float sensorValues[40]; //declare this as a global variable

//then later in the program :
for (int index = 0; index < 40; index++)
  {
  sensorValues[index]  = readDevice(index + 0x05A);
  }