remove hardcoded array

Dynamically create array based on canvas size