Given the question text, my reply would be:
Compute the correlation between all (or just a random subset, if 600^2 computations is too much) pairs of stocks.
Sort the pairs, and choose stocks from the top until you have n distinct ones.
It would help to state what you are trying to achieve.
Is it to pick stocks representative of the market? If so, you ...
The keyword here is directional exposure. You first need to define what is the instrument that you do not want to have directional exposure to. Oftenwise in case of equities, this might be an equity index.
Then you would need to estimate the betas of each security against the index and set the weights in any such way that the sumproduct of all the securities'...
The impact will be uncertain as stated here due to 2 opposite effects:
Increasing correlation would increase the overall basket volatility, thus tends to push the option price higher
Increasing correlation would decrease the Forward price, thus tends to push the option price lower
Now, point 1 is in itself not 100% clear if you price with stochastic vol ...