Rapid clicking is a symptom of a dead battery or a bad
battery cable connection. However, since you said the
heater stopped working before it died I suspect you
had a large, sudden, coolant loss, the engine severely
overheated and either burned out the starter or locked
up the engine. Coolant temperature sensors are
designed to work while submerged in the coolant.
When you have a major coolant loss and the sensor is
not submerged in coolant the sensor is not sending a
signal that the engine is overheating. The warning light
will not necessarily come on and, if equipped, the
temperature gauge may drop to the cold position. I
actually had that happen to me once. After I parked my
car and went into work one of the radiator hoses burst.
I was driving home, after work, and the engine started
knocking. I immediately pulled over, shut off the
engine, and discovered the radiator was bone dry! The
temperature warning light never came on!! The engine
was knocking because the excessive heat made the oil
very thin! If I hadn't immediately pulled over and shut
off the engine, the engine would have been ruined!!
Hope that helps! Jim