Yes, you can use nested loops See L and G91 codes. (Loop and Incremental positioning) One loop for the slot start positions, and then run the inside loop to actually cut the slot. Or use G90 to position the slot starts and then use G91 to actually cut the slot using the loop