int[] arr = {1,2,3}; IntStream.of(arr).boxed().collect(Collectors.toList());
List<Integer> al = new ArrayList<Integer>(); Integer[] arr = new Integer[al.size()]; arr = al.toArray(arr);
int[] array = list.stream().mapToInt(i->i).toArray();