add opts for array patten