replaced _assoc with _array and added  param to allow numbered and associative arrays