Batch / bulk custom field context script

Hello there,
trying to put together the script for cloning custom field context script.
Large customer, 500 projects, about 2000 CF, all with contexts.
Running migration - split of 1 project into 4.
Project using about 80 custom fields, which do have random context (not only to this 1 project).
Need to update those 80 CF - append 4 project context, even the default would work for me.
Listing that tiny window with 5 project and trying to select within 500 projects where some of them are already selected showed as really impossible.
I got this as inspiration SplitCustomFieldContext.groovy | searchcode but generally stuck with getting contexts from cfs.
Did you faced anything similar?
Thanks, Tom