by Chouzar
You can't reorganize units facing an opposing unit.Going by your example the only force you may move is A1, if you want to move it to D3 the unit would be flanking and it may look like this:
D1 D2 D3 D4
A2 A3 A4 A5
A1
If you would like to "slide units" you may move A1 to a position between opposing forces:
D1 D2 D3 D4
A2 A3 A1 A4 A5
In wich A1 is still unpossed.