Strange behaviour setting pinMode by array

Your program worked correctly. LED on pin 10 was the correct brightness.