iMac making strange electrical clicking noises I have a late 2014 5k iMac with 256GB SSD drive. Last night my iMac started making noises similar to that of a disk drive when it's reading and writing. 

After poking around I found that the noise must be related to the GPU because:


The noises increase when scrolling a webpage or change workspaces and then subside when I stop.
Running a web GPU benchmark or watching a video will make the noise constant until I close it
Also changing the brightness causes the noise


I doesn't sound like a bad fan as it's a very clicky noise versus a whine or hum.

I ran the hardware diagnostic test (Holding D when you restart) which resulted in no errors. I tried to blow some air in the GPU vents which didn't change anything.

I feel if I take the iMac in and describe the issue they will send the iMac away for few weeks and it will be sent back saying there isn't any issues.

Any suggestions?

EDIT

Here is what it sounds like. It also makes this sound when the display is off, so it could be like @Allan said that it is the power supply.
There are only a few components in an iMac that can make clicking noises.
It's highly unlikely that it's your logic board or a component of your logic board, but the possibilities are:

Power Supply
Hard Drive
Speakers
CPU Fan

I've included a sample picture and the location of the components in the picture below


Power Supply
There are a number of components on the power supply that could be at fault here from capacitors, transformers, relays, etc.  I have provided the posterior view (what you are seeing in the top picture is the anterior) of the power supply

Hard Drive
You said you only have a 256GB SSD, so, it's unlikely that you have a traditional spinning hard drive, but, to make sure, issue the command diskutil list in Terminal and post the output
Speakers
It's not out of the realm of possibility that you have a malfunctioning speaker(s).  Try turning off the sound or better yet, plug in a headphone so it forces output to that device.  if the sound goes away, it will be something associated with your speakers
CPU fan
You said that the sound was more &quot;clicking&quot; than a whir or a hum.  However, it is still possible that some debris is interfering with the operation of the fan or it may be a defect in the motor.

How to fix
Based on your comments, I tend to agree that the power supply is the culprit given that it persists when the display is off or even while sleeping.
The good news here is that these components are relatively inexpensive. A quick search on Amazon  yields the power supply for about $120.  I have bought from this vendor for my own iMac and had good results (I am not affiliated with them).
The best option, if you don't have the tech skills to open this up is to have a pro take a look at it.  Be sure to include the video you linked in your comments.