Single dimensional arrays | how to declare, initialize and process an array?