control 3x 7 segment single digits with 6 buttons

Use arrays and a for loop to avoid repeating code