refactor array_addition_I code to improve logic