Allocate private arrays inside loop