Add type annotations for ArrayPatterns and ObjectPatterns.