How to fade all 20 pins in and out ...

Yes you could do that, but it obscures the basic idea, that you can react to a pin changing. It isn't fabulously practical as such (there would be easier ways of fading 20 LEDs).

Actually what would be interesting would be to try to make a ripple effect, and make use of the delay (eg. pin 1 causes pin 2 to change which causes pin 3 to change and so on).