The best option would be to use motor groups.
Vexcode api: https://api.vexcode.cloud/v5/class/classvex_1_1motor__group
Forum post with example code: