I agree with saved, the easy solution could be split a big group in two / three, and just make the condition of the distance and the domoves in different points.
Anyway, thinking about 20 units behind a tank is not realistic. I suppose this kind of manouvres are made by 5 - 6 units as much.
So, if we use a small group, a domove foreach is ok. If the group is big, then I think a group leader domove + a compact column formation will work better. It wont make the whole group being behind the tank, but they will keep formation and won't get stucked stupidly...
Another question, In order to make the inf units continuously follow the tank, I had to make them run in safe and never fire, but it is also unrealistic. DisableAI could be the solution?