extending array: to_h()