Converted ArrayUtil.java to a template and programmatically generate it from src/templates/GenerateArrayUtils.java.