min method for array handler