Adding custom fields to SuiteCRM and doing mass updates

SuiteCRM 7.8.31. I am planning to add a couple of custom field to targets and leads to use for selective inclusion in certain marketing activities. One such use could be to randomly assign targets to different groups for eg A/B-testing in campaigns as well as for other similar purposes.

In order to automate setting this custom field for a large number of records of targets I need to do a mass update. This is of course very easy to do if only SQL is used but how can I do it within SuiteCRM?