One thing that many people miss is that when shooting a barrage, the initial range and LoS are made from all firing units to
*a single enemy UNIT*. This is often ignored if the entire formation is in range, but can have an impact at the extreme range of shooting or when the target formation is partly obscured by terrain.
From the diagrams, when shooting at formation "x" this unit would have to be one of a group of 4 on the left hand side. Shooting at "y" it would have to be one of the group of 4 units at the rear of the formation - if the front units of the group were in range, or one of the two units on the Left hand side of the formation if the "grey square" is deemed to obscure the rest of the formation. If visible, all the units in formation "z" can be touched by a single template.
As discussed, subsequent templates
- must touch the first,
- must be placed to cover other units in the formation,
- may only cover units from other formations if no units from the original formation can be covered.
Formation "z" demonstrates this point and shows that potentially the remaining template(s) could catch units from nearby formations, while it would be much less likely if shooting at the other formations (as Dptexys points out)
And yes, Barrages can "shoot round corners" and beyond the maximum range of the weapon through placing subsequent templates in these locations - as I found out when facing a Mega Gargant in a tourney . . .

In this case, if the "grey square" is deemed to obscure most of formation "y", the initial template could be placed to touch the three large units in "y" (and actually be placed beyond LoS provided it touches the target unit); the second would catch the rearmost units, while the third template might just be able to clip formation "z" or "x" whilst leaving two units from "y" untouched because they are beyond reach.