[utils] added a method to sum an array of numbers