add ArrayPattern and ObjectPattern support