The torque dip has nothing to do with it being a boxer engine. It has nothing to do with it being a flat 4 instead of a flat 6. Correlation does not imply causation.
The torque dip exists due to variations in runner length and port tuning. Boxer engines often have different length exhaust runners between cylinders and thus different torque peaks across cylinders. Subaru does this for easier packaging and lower costs. If all the exhaust ports in the FA20's heads were equal in size, shape, length, and port tuning there would not be a torque dip.
There are plenty of flat engines without torque dips and not coincidentally they have equal length exhaust ports throughout the engine.
Also, Intake port tuning does not need to match exhaust port tuning. Some manufacturers design intake tuning to make peak torque at slightly higher RPM than where the exhaust port tuning makes peak torque for a broader power band, but spread the peaks too far apart in the RPM band and you get peaks.
It is much more complicated than this, but it's a dumbed down explanation. For a real comparison look at power outputs between engines with varying port tuning and you will see torque dips. The VW VR6 is an ensy example of this in an engine that is a cross between an I6 and V6. Really it's a shallow V6 with one head, making it an I6.
I have done all sorts of crazy things building rotaries with varying port tuning to make all sorts of weird power bands. I can make a 13B with a flat torque curve from 3k-8k, and I have also built 13B's with torque dips.
What the madness, a NA 13B with 2 torque dips?!?! This was done by shortening the intake tract, thus moving peak torque tuning for the intake to a higher RPM range(7k goal), and changing the exhaust tuning to make peak torque at 6k.

The same engine. Both intake and exhaust are tuned to make peak torque at 6700 RPM, Before:
Remember, port tuning isn't always going to be perfectly linear up to and down and away from the RPM where peak torque is made, UNLESS the runners are perfectly straight with zero variations (not the real world). With variations in intake runner lengths and shapes you gett all sorts of flow characteristics that favor a few RPM points and even throttle positions. You can actually design an engine that makes more part throttle torque at say 3k rpm than it would at 3k and wide open throttle due to port flow, velocity, etc.