optimized memory usage for particles array