There is something that still confuses me when you say “which flanker image (i.e. the direction of the middle arrow) would precede the sentence task,” because the flanker image does not (immediately) precede any sentence in a
flanker-flanker pair, and the sentence is not (immediately) preceded by any flanker image in a
sentence-sentence pair. You say that my second solution should work, so I presume that you do not want
flanker-flanker pairs in the end?
latinMix function takes two sets of labeled trials, say “A” and “B,” and outputs a sequence of pairs of trials evenly distributed over
B-B. For example, if you have four A trials and four B trials, you could get
A(1)-B(4)-A(3)-A(2)-B(1)-A(4)-B(3)-B(2). I hard-coded the function to output such a crossing from strictly two labels, but it could in theory be modified to accommodate any number of labels. For example, with three labels
C, a generalized function would output an even distribution of triples of trials over
C-C-C. Is that what you want?