On the trans, right below where the shift linkage hits it.
If it is the starter you hear hitting, (the loud click) check the main cable going to the starter. The little wire is controlled by the ignition switch, and just activates the solenoid. Solenoid pulls the gear out to engage the ring gear, AND, it closes contacts at the back, to complete the circuit to the starter motor itself. Sounds like the second part isn't happening correctly, or, you have intermittent power at that cable. It pulls a fair bit of power there.... so, even a slightly crappy connection can give you issues.