I’ve been experiencing the same thing. Interestingly, it seems to coincide with email notifications for me. I have two computers set up (one of them being the M1 Mac Mini), and I switch between the two of them with a KVM switch. Whenever I’m switched to my other computer, and I receive an email, I’ll hear a normal email alert on that computer, and that strange clicking noise from the Mac Mini.
It’s consistently 3 little clicks, which sound like (as you said) a mechanical hard drive click. The fact that it seems to coincide with notifications makes me wonder if it’s intentional, but that would be a very strange decision on Apple’s part. If I can reliably reproduce it, and figure out what’s up, I’ll update here.