how to create an array with both members and number of members undefined

Think you should only set the mode after the press of a button and move the LED-code in the right case. Because the only thing a button or a serial key does is changing the state/mode of the device. If the device is in free mode that "state"knows what to do ;)

e.g.
 [code]

switch (mode){

  case FREE:
    setLedOn(FREE);
    val = analogRead (potpin);
    val = map(val, 0, 1023, 0, 179);                           // val = val * 45/256; // <==> val * 180/1024
    myservo.write (val);
    Serial.println (val);                                    //print val for checking
    lastPosition = val;                                      //save last position for REWIND fixing
    delay (waitForServo);                                   // should be refactored away -> like blink without delay
    break;
...

setLedOn(int ledpin)
{
  for (int i=0; i< #LEDS; i++) digitalWrite(LED[i], LOW);  //set all LEDS off 
  digitalWrite( LED[ledpin], HIGH);  <<< the enum of mode used as index of an array of ledpinnumbers ;)
}

think you get the idea

[/code]