What is this brown flexible wire with 5 sliding pieces?
That's a flex system cable with several clutch changeover elements strung onto it. You can see it on the back of 8002 Destroyer Droid:



That's the only set with those parts in brown, so that's certainly where it came from. You can find all of the parts in the set inventory.

Those cable end elements have never felt quite like LEGO bricks to me, as they are one of the few parts that I feel like I might break when taking them apart.