If you sort the primary field alphabetically, will the US states be also alphabetized? If so, you can run the batch update block on the linked record field to sort the linked records alphabetically. Then the rollup values should be sorted the same as the linked records.
Formulas and rollups cannot sort. Batch Update will only sort linked records by the primary field. Since the last name is probably not the primary field Batch Update probably won’t help you. The order of values in rollups matches the order of linked record fields.
By the way, here is a simpler rollup formula. Does the same thing, but just a little simper.
If you want a script to run automatically, you can design it to run as an automation script. If you want the script to process records in bulk, it can do that too. It is all in how you write the code. However, typically is is difficult to have an automation script run on records in bulk unless it is set to run on a schedule versus being triggered by an individual record.
I’ll send you a direct message with more info on trying out the pre-release version of my app.