Update ArrayCollection.php

Added implementation of sum method