Glad you like the idea! Obviously scaling could be an issue (20 random addresses doesn't add a lot of privacy/noise if the user inputs 5000 addresses)
I can use
List of all Bitcoin addresses with a balance to get a list of random addresses. I'd like to make one file on my server that gets updated every minute, but I haven't found a method to just grep the addresses without reading the entire file, which is too resource intensive for frequent updates. Putting all data in a database would no doubt be the solution. But if you can pull that off, you're close to getting rid of the external API completely.
You could use shuf to randomly grab n number of rows from your list of all addresses with a balance, I've found it to be fairly quick with large files in the past.
shuf -n 20 all_addresses_with_balances.txt
Would give you 20 random lines from the file with all addresses.