Arrays for threads created, define max of threads