Many computer models such as cellular automata have been developed and successfully applied. However, in some cases these models might be restrictive on the possible solutions or their solution is difficult to interpret. To overcome this problem, we outline an approach, the so-called allagmatic method, that automatically creates and programs models with as little limitations as possible but still maintaining human interpretability. We earlier described a meta-model and its building blocks according to the philosophical concepts of structure (spatial dimension) and operation (temporal dimension). They are entity, milieu, and update function that together abstractly describe the meta-model. By automatically combining these building blocks, new models can potentially be created in an evolutionary computation. We propose generic and object-oriented programming to implement the entities and their milieus as dynamic and generic arrays and the update function as a method. We show two experiments where a simple cellular automaton and an artificial neural network are automatically created and programmed. A target state is successfully evolved and learned in the cellular automaton and artificial neural network, respectively. We conclude that the allagmatic method can create and program cellular automaton and artificial neural network models in an automated manner.