converting HashSet directly to Array avoiding the ArrayList-to-Array converting that 'sort' method does