Function made to add message to the view by giving it a message from the array.