Programming Sensors to Arduino

A sensor pointed at an unchanging hole is presumably a more or less fixed reading.
A ball passing through the sensors field should result in change in reading.
One option might be code that polled the string of sensors looking for changes in readings, and then acting when it found one.

You might like this:
http://www.ebay.com/itm/10-x-Ultrasonic-Module-HC-SR04-Distance-Measuring-Transducer-Sensor-for-Arduino-/130705106799?pt=LH_DefaultDomain_0&hash=item1e6ea1a76f

Some people might like lever switches to detect the balls.
http://www.ebay.com/itm/6-LOT-TEMCo-HEAVY-DUTY-15A-Micro-Limit-Switch-Long-Lever-Arm-SPDT-Snap-Action-/281125086074?pt=LH_DefaultDomain_0&hash=item41745c637a