A material that gets tough when current is passed through it and becomes soft when current is stopped?
I got good news and bad news.

The good news is that I know that the exact material you are looking for exists. I happened to come across a TEDx talk on bionics where a mention and video of such a material that is flexible and compliant, and turns stiff and rigid when voltage is applied. The video can be seen here (The link starts at the part I mentioned): https://youtu.be/CDsNZJTWw0w?t=7m13s.

However, the bad news is there is no clear place I can find to get this peculiar material, all the presenter said was that it is developed by SRI International. 

Addressing your other question on how to make a magnetic field with an Arduino, that can be achieved with the help of some other components including a MOSFET and an inductor.

The inductor is basically a coil of wire, usually wrapped around a core, where upon the application of current passing through the coils, a magnetic field is created, which is used to store energy. This is precisely how an electromagnet works. Though the amount of current required to establish a strong magnetic field with an inductor exceeds the max value allowed for Arduino pins, the MOSFET is used to act as a switch controlled by signals from the Arduino.

Hope this helps, good luck finding out how to get the material, and be sure to tell me if you do!