Save some arduino pins when driving a 4 digits 7 segments display
I know it's not what you asked, but you're using a lot of pins, why not try streamlining them and go to an I2C backpack? This one from adafruit includes a single 4x7 segment display.

given your comment, another option would be an I2C/SPI 7 Segment driver. (datasheet). 

new edit: Actually, when I posted the above 7 segment driver, this is the one I was thinking of. I don't know why I didn't find this the first time.

max7219/7221 datasheet and digikey source: