Refactoring the variable declaration, making it accept the array size.