I would like to make a script that checks certain addresses against an MPK to verify you own the addresses. If this were possible I was thinking there are 2 ways it could work. 1, generate addresses until one of them equals the address you are checking or 2, just be able to check if the address belongs to the MPK. Is the 2nd one even possible? Because that is the more desirable option.
In all likelihood, every address belongs to you after a sufficiently large number of iterations. It's because the mpk produces an address by adding to your first secret key a deterministic offset which is a hash. The later should eventually cover every possible value. It's not a proof - there could be a cycle, but it would make the hash function distinguishable from random IMO.
You don't need a script cause you own them all