Oscillatory activity is ubiquitous in natural and engineered network systems. Yet, understanding the structurefunction relationship in oscillator networks remains an unanswered fundamental question of modern science. In this work, we present a method to prescribe exact and robust patterns of functional relations from local network interactions of the oscillators. To quantify the behavioral synchrony between agents we introduce the notion of functional patterns, which encode the pairwise relationships between the oscillators' phases -akin to the Pearson correlation coefficient between two time series. The main contribution of this work is the development of a method to enforce a desired functional pattern by optimally tailoring the oscillators' parameters. Importantly, our method is agnostic to the scale at which a network system is studied, computationally efficient, theoretically sound, and presents an interpretable mapping between the structural principles and the functional implications of oscillator networks. As a proof of concept, we apply the proposed method to replicate empirically recorded functional relationships from cortical oscillations in a human brain, and to redistribute the active power flow in an electrical grid. Our theory finds applications in the design, analysis, and control of oscillator network systems.