remove redundant code for Integer lists to int[]