Per scorrere un array si usa foreach

Per l'altro problema non ho capito che vuoi fare!