added more utility methods to dynamic array (forEach, map, indexOf)