Sounds to me like the thing that DNA does:
Programmable Shape Shifting Materials
Previous shape-shifting materials have needed some external trigger to tell them to transform, like light or heat.
Now, a US-based team has encoded a sequence of shape transformations into the very substance of a polymer, with each change occurring at a pre-determined time.
Materials programmed to shape shift
BBC News, Sep 2016