It's really complex system.
There is a block that must be a generator, with direction rotation. When the redstone is on, call the procedure and check the blocks in front of the generator (don't forget about direction of block) and if there is force field block, move to the next iteration. The iterations are the working distance (5 blocks, 10 blocks, set your own count). If there is an air, set force fuild block and move forward. On redstone off procedure remove all force fuild blocks in front of the generator on working distance.
It's really complex system.
There is a block that must be a generator, with direction rotation. When the redstone is on, call the procedure and check the blocks in front of the generator (don't forget about direction of block) and if there is force field block, move to the next iteration. The iterations are the working distance (5 blocks, 10 blocks, set your own count). If there is an air, set force fuild block and move forward. On redstone off procedure remove all force fuild blocks in front of the generator on working distance.