Subsurface flow and vegetation patterns in tidal environments