using either a rotory encoder or button press count to change pwm mode

is this trying to use the annologue pins i

 const int Input_Pins [7] = { 3,4,5,6,7};

No, but it does use pin zero several times.