array functions - notes from lecture