Creating a new array (and copying data into it with System.arraycopy) doesn't work in generic case, because the actual array class depends on call site.