Please help with aquarium lights - one more question- solved

It's true - to reuse that value in more than one place is unwieldy, and so you have the right idea:

int bluepercent[] =  { 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255, 255, 255, 255, 255 };
int whitepercent[]=  { 0,  0,  0,  0,   0,  26,  52,  78, 103, 128, 154, 180, 205, 230, 255 };

int total=sizeof(bluepercent)/sizeof(bluepercent[0]); // <--

for (int i = 0; i <total; i++) // <--
{
  analogWrite(blue, bluepercent[i]);
  analogWrite(white, whitepercent[i]);
}

Now you can use 'total' throughout your code to indicate the number of items - I'd recommend it over 'array', which may be confusing at 4am in the morning when you wonder 'what is THAT variable for'?

One advantage of using total here is that the whole code doesn't need a change every time you do something - as long as total is updated, you're safe.