Chemists have long conceptualized tiny machines that could fabricate drugs, plastics, and other polymers that are hard to build with bigger tools.