My 2010 Subaru feels like it has been tampered with and is now throwing a bunch of random codes as well as the radiator fan kicks on and off repeatedly while the car is off but the key is in the on position.
Look for a bad ground or grounds. Battery, battery to block, etc. Clean those junctions down to bare metal. Multiple random codes means you are seeing back feeding from circuits that are looking for a ground path. That confuses the ECM's diagnostic process. Normally a flashing SES light is due to a misfire that will cause imminent catalytic converter damage. Code 300 is the misfire code. Sometimes code 301 is cyl #1, 302 cyl #2, etc. depending on manufacturer. Use star washers on your grounds to bite through paint and rust.