Loop through an array of words