updated many new utility functions in array and functions with tests