Array logic practice