Refs #8508 Avoid declaring statically sized arrays

Windows compiler complains when declaring a statically sized array
while passing in a size variable which is evaluated at run-time