Gardeners need not be concerned about “crossing” between crops if they do not save their own seed. Many closely related vegetables will cross-pollinate (summer squash and pumpkins), but the effect is only on the seed and not on the fruit. So, you can safely plant melons beside cucumbers, red tomatoes next to yellow ones, for example.
The single exception is sweet corn. Cross pollination in this crop will influence the color, shape and flavor of the kernels.