Implement matched pattern extract for fn headers
Update all tests for new pattern extraction