Juerg,
A couple of suggestions... If your goal is specifically just correlation information, Mathematica has some built in functions for this. Check out the documentation for Correlation and CorrelationTest for starters.
If you're really interested in manipulating the data structures, then there are many approaches, but I don't know which ones would be most performant without benchmarking each one. The first approach that comes to my mind would be to use Associations. Check out the documentation for Association, KeyIntersection, and Merge.