Update CFs from key value pair database

I need to apply about 50 custom field values across my tickets, based on requestor, subject and to fields. I want to get the value from the ticket/transaction, then loop through my key/values and update a custom field using the value from the key/value file…

Instead of writing 50 scrips or 50 crontool jobs, I figure I can store all my custom field values in a file, then in a single scrip, search and match and update my fields that way.

Has anyone already created this?

Or is there a better way to do a whole lot of checks on a ticket

I think this has already been solved here - https://docs.bestpractical.com/rt/4.4.1/extending/external_custom_fields.html