For what reason (s), do you want to use a 74LS259 Bit Addressable (8-bit) Latch to drive a 7-segment display device when you can directly drive the device using PORTD of the UNO?
Let us look at the MCU burdens to drive only segment-a using PD5 and using 74LS259:
1. Using PD0 bit of PORTD
pinMode(5, OUTPUT);
digitalWrite(5, HIGH); //segment-a is ON
2. Using 74LS259 Chip
Selection Bits (S2, S1, S0) are connected with: DPins-10, 9, 8
Enable (G/) Bit with : DPin-11
Data Pin (D) with: Dpin-12
Segemnt-1 is connected with Q0-pin of 74LS259
DDRB = 0b111111;
PORTB = 0x00;
digitalWrite(12, HIGH); //Data Bit HIGH
digitalWrite(11, HIGH); //Enable pulse at G/-pin
digitalWrite(11, LOW);
digitalWrite(11, HIGH);
Do you still want to use 74LS259? Do you want to exercise the use of double for() loops? If so, then drive the segment pins of a 2-digit multiplexed type display unit using 74LS259 and drive the cc-pins of these devices using 74LS138. Write codes to show 2 an 3 simultaneously on these display devices.