In that case, yes, my suggestion applies. Put a case structure around the For loop. Add a shift register around the while loop to act as the counter. Increment the counter on each while loop iteration and reset to 0 when it reaches whatever value you want. Put the For loop inside the case that resets the counter to 0, and then you only two cases: Default case that adds 1 to the counter, and the case that resets the counter to 0 and sends the data.
(I often implement this as a count-down instead of a count-up, with the logic in the 0 case, but that's personal preference.)