How do I get rid of duplication

the first arg to setPWM() is hardcoded to the array index. it could be a field in the struct. then there is no need to skip entries "for future use"

long variable names can be cumbersome. using a short ptr variables can make things more readlable. a ptr to the turnArray element can make the following line

(cmri.get_bit(i) == 1) ? (turnArray[i].targetPos = turnArray[i].pos1) : (turnArray[i].targetPos = turnArray[i].pos2);
(cmri.get_bit(i) == 1) ? (t->targetPos = t->pos1) : (t->targetPos = t->pos2);