You'd want to focus on the rear o2 sensor, not the front.
Rear oxygen sensor monitors the cat system. The pre-cat o2 sensor is used to determine a/f ratio from exhaust gases and is unrelated to the cat monitoring
the rear o2 sensor can be generic,
but i recommend the ones that come with the plug pre-attached.
usually it will cure the problem.
but if not , then replace the front with an o2 from SUBARU,
or much better quality.
the computers are picky.
if that does not do it, look for intake or exhaust leaks,
either one can cause this code.
do not replace the cats,
they do not go bad very often unless you drive with a flashing CEL for a reallly long time.
(flashing CEL indicates a condition which could damage the cats. misfires are the most common.)
and last, google 'subaru p0420 anti fouler'.
you modify a spark plug anti fouler and use it to back the rear sensor out of the exhaust stream.
works every time.
rumor says it will work even if you have no cats.