What index in the array would you like the battery voltage to go in?
How many items does this array hold?
How are you planning on stuffing a cString "Volts " into an array of bytes?
Arrays are lists of identical things. Ints, bytes, floats..
Arrays must be sized at compile time.
Anyhow..
float mydata[20]; // This would set up an array of 20 floats.
mydata[12] =getRealBatteryVoltage(); // This would stuff a battery voltage into index 12 of that array.
You can't declare and initialize a static variable with the return value of a function. You have to give a constant initial value for both batteryvoltage and mydata.
Alternatively:
char mydata[25];
//elsewhere in code
snprintf(mydata, sizeof(mydata), "Volts %4.2f", getRealBatteryVoltage());