IT’S hard to beat the versatility of plastic on a production line. Melt and inject it into molds, let it cool and harden, and out comes an endless variety of parts at high rates of speed.

Metals can’t always compete — except, perhaps, in the movie “Terminator 2,” where an evil android can promptly transform molten metal into whatever shape is needed to challenge Arnold Schwarzenegger.

But now, off screen in a laboratory at the California Institute of Technology, researchers have found an ingenious way to coax metal alloys to solidify into a range of shapes as though they were plastics being molded — and thus create stronger products. And, as such, molded metal might someday be useful as structural components or as casings to protect laptops and smartphones, for example.

In the May 13 issue of Science, William L. Johnson, a professor of engineering and applied science at Caltech in Pasadena, along with colleagues, published a new, ultrafast method for heating and injecting a metallic alloy into a mold to create shapes.