print array not working (use array indexing or print value at pointed-to memory?)