Yeah, all that clicking is just what you think - the ratcheting mechanism engaging and locking the e-brake pedal in place where you left it - so the cables remain under tension while you are gone. But that is only
if they actually get tensioned when you apply the brake. Even if there where no cable attached the noise would still be the same.
Just because you hear that sound is no indication that anything other than the pedal is being locked down. The cable themselves don't make any noise.
You are going to have to crawl under and do some investigating. Here is what your e-brake system looks like:
Look for broken cables, connecting links, etc. The problem will most likely jump right out at you.