Smart contract to get account balances in batches?

I need a means to fetch multiple account balances in batches, like 1000 addresses at a time.
Is there a way to do this? Maybe some existing application / smart-contact?

You have thousands of active addresses on-hand?

You could pair the account info function from the algod methods with threading for efficiency since there’s a short delay when querying, but there’s no specific function that allows you to do this in batches to my knowledge.

Yes, occasionally i need to handle such a situation.

I managed to create a smart contract that can fetch balances for 64 unique accounts in a single request (limit for the smart contract is 4 accounts within one transaction and 16 transactions within one group). Additionally, I added async and threading for greater efficiency.