Replaced alternator about 3yrs ago and battery, could this be the same problem and why?

Battery light came on. The next day my vehicle turned off completely. Had to get a jump to make it home. Dash board was going haywire. Alarm went off a few times

Im trying to replace temp sensor located between cyl #2 & #3 in the top of head.A standard 19mm deep well does not fit,it won't get by the plastic electrical connector.... Any ideas, I've tried all auto parts stores, no luck...Thanks

When I shut the engine off the key will not come out of the ignition. After a couple of minutes, I'll hear a click sound, and then the key will come out. This doesn't happen every time, but more often than not. Does my ignition switch need to be changed?