Glad to hear you found a problem part. Make sure since the fault and evidence of failure means high currents were involved. Things that melt are not a good indicator --- sometimes it's also something else. The fuses in the high current battery wire from the alt +batt connection to fuse box and the wire to attaches to battery post circuit could be suspects. Inspection with eyes, tugging on wires into connectors, feeling the wiring sheath for abnormal defects.
Most important is don't just replace alternator and be done. Unless you double check that charging current is working correctly. Normal type automotive battery fully charged open terminal is 12.6-12.8. When you have a fully charged battery and engine is idle no accessories on, battery voltage should be around 14-14.5 volts. Above this and a known good fully charged battery means the alternator is charging higher then necessary. Above 15 volts at any time is a sign that something else is still causing trouble.