It could be any one of the electrical connections talked about above.
The alternator keeps the battery charged; but not to just have battery power to start the truck, the battery is a power reservoir.
The energy, in the reservoir, is called for whenever the alternator can not keep up with the electrical demands.
The output form the alternator is high when the engine rpms are up, when the engine ides, the alternator output falls off; and, if the current demands are high )blowers, lights, speakers) the battery must provide the current the alternator can not provide.
So, you might have a weak battery.
One other possibility, the idle rpms maybe falling below the "normal" idle rpms. If the idle is falling below the normal, of about 625 rpm, the throttle body may need cleaning.
FYI It could also be the electric fan clutch is on its way out. The same symptoms that you described were what mine did for about a month before until it finally failed and locked up. It about drove me crazy trying to determine where the electrical drag was because it didn’t stay consistent, no check engine light and it didn’t sound like the fan was locked up.