Mutual information between the time series of two dynamical elements measures how well their activities are coordinated. In a network of interacting elements, the average mutual information over all pairs of elements I is a global measure of the correlation between the elements' dynamics. Local topological features in the network have been shown to affect I . Here we define a generalized clustering coefficient C_{p} and show that this quantity captures the effects of local structures on the global dynamics of networks. Using random Boolean networks (RBNs) as models of networks of interacting elements, we show that the variation of I ( I averaged over an ensemble of RBNs with the number of nodes N and average connectivity k ) with N and k is caused by the variation of C_{p} . Also, the variability of I between RBNs with equal N and k is due to their distinct values of C_{p} . Consequently, we propose a rewiring method to generate ensembles of BNs, from ordinary RBNs, with fixed values of C_{p} up to order 5, while maintaining in- and out-degree distributions. Using this methodology, the dependency of C_{p} on N and k and the variability of I for RBNs with equal N and k are shown to disappear in RBNs with C_{p} set to zero. The I of ensembles of RBNs with fixed, nonzero C_{p} values, also becomes almost independent of N and k . In addition, it is shown that C_{p} exhibits a power-law dependence on N in ordinary RBNs, suggesting that the C_{p} affects even relatively large networks. The method of generating networks with fixed C_{p} values is useful to generate networks with small N whose dynamics have the same properties as those of large scale networks, or to generate ensembles of networks with the same C_{p} as some specific network, and thus comparable dynamics. These results show how a system's dynamics is constrained by its local structure, suggesting that the local topology of biological networks might be shaped by selection, for example, towards optimizing the coordination between its components.