If it's not a fan noise, it could be an exhaust leak which is exacerbated by a plugged catalytic converter. That would also cause a loss of power and engine overheating especially at higher throttle settings. It should also set an oxygen sensor related fault code.
You need to figure out if the sound is coming from the engine bay, from under the vehicle, or out the back? (exhaust pipe)
According to the coolant temperature gauge, does the engine overheat when you hear the noise? Yes, No?
You could also have a vacuum leak which should set a fuel trim related fault code.
Have you checked the tension on the serpentine belt? Age of the serpentine belt? They usually squeal as they wear out and/or lose tension.
Chum lee