Optimization: Replacing loop array fills with Arrays.fill()