takes an array of input and displays the type using a foreach loop