Dynamically generate array of 0s