ArrayUtils has the ability to dynamically determine the type of your list.
List<Comparable> comparables = new ArrayList<>();
comparables.add(null);
comparables.add(1);
comparables.add(3.1415);
comparables.add("Lars");
Comparable[] comparableArray = ArrayUtils.toArray(comparables);This works in almost all cases with the notable exceptions of empty arrays, some common interfaces which will not be preferenced. In which case you can always use the overloaded method
Comparable[] array = ArrayUtils.toArray(comparables, Comparable.class);