Train sounds...What were they?

Yes, goofy title…
As I was railfanning today, I heard a couple of interesting sounds from a train that went by. At the end was a cut of autoracks. The train was stopping, and shortly after the slack ran in there was a sound like hundreds of shopping carts banging togehter in their usual clattery fashin. What was it?
Later on, the engines (GP38-2s) were doing some switching in the yard, and it sounded like there was a lot of arcing coming from the traction motors. Was this the case? Is it because they were DC motors under a heavy load at low speed?

I’m pretty sure the sound is the autoracks banging around as the slack ran out. Were there any tanks in the train? They slosh around and cause the slack to run in and out.

The sound you are describing with the racks is the protective siding vibrating. Can’t say about the T/M sounds.

Maybe to arcing sound was the air dryers on the locos. They make a hiss/clicking sound that could be mistaken for an electrical arc.