How do you get all positions in a certain area. For example, the first position is 1 1 1 and the second is 10 10 10, how do i get all positions in the area?
Don't do that. Just process each position one by one. You are wasting memory by making an array just to store so many references to a Level object, and so many objects that may not be collected by GC if you store them.