Okay, I don't want to be a wet blanket but back up a second ...
">5000" ... "any number of AA batteries"
Say that worst case only 10% of the LEDs can be on at the same time. That's 500 LEDs.
Presuming an average of 20mA per LED, that adds up to 10 AMPS.
You need to be considering a car battery, not AA cells.
Suppose, God forbid, you want all 5,000 on at the same time ... that's 100 amps.
Now we're talking a couple of golf cart batteries to get any run time out of the thing.
Sure you could mux them, but you'll take a big hit in brightness.
What's more, you said bright LEDs which could easily draw much more than 20Ma depending on the device.
I think you need to do a little
power budgeting before diving into what are going to be some serious computer horsepower issues.