Using Parallel.ForEach to speed up matrix build