Parallel retrieval of correlated patterns: From Hopfield networks to Boltzmann machines