Refactors the student list using an array and an iteration to avoid 'puts' duplication.