Correlations in Random Graphs and Mean-Field Spin Glasses