Pass array to puts instead of iterating over it