Controlling heat flow is crucial to improving human's production efficiency and daily life. Although thermal metamaterials have played important roles in heat manipulations, as the growing demands of intelligent and multi-functional apparatuses, the requirements of more advanced metamaterials are still far from being satisfactory. Moreover, the popular thermal metamaterials such as cloak, concentrator, rotator, etc., are essentially based on particularly spatial distributions of thermal conductivity. Hence, the designs of thermal meta devices with certain functions are greatly restrained by the positive and definite conductivities of natural materials. In this article, we propose an approach to building thermal metamaterial by utilizing the optomechanical system as an elemental unit. After deriving the relationship between thermal conductivities and pump light in one such unit, we can program the value of conductivity at an arbitrary point of an array system consisting of optomechanical cells by directly adjusting the pump power. This characteristic ensures great freedoms and flexibilities in designing metamaterials and permits people to achieve any effects of existing thermal devices by using only one array system.