You're looking for porkchop plots (and Lambert's problem).
These plots are created by brute force solving Lambert's problem for a range of departure times and arrival times.
note: The numbers on the slanted cyan lines give the duration of the trajectory in days.
For example, Mars 2020 launched on 2020 July 30, which is 30 on the x-axis, and arrived on 2021 February 18, which is ~109 on the y-axis. These coordinates give a delta V that is inside of the 6km/s contour, which is the smallest on this plot. To clarify, this plot was created by the sum of the v-infinity vectors when departing Earth and arriving at Mars. In a lot of cases these two values are split up in porkchop plots, but I personally find this one easier to read (at least to get an initial idea of where is good to look for dates).
The gap in the middle represents a ~180 degree change in true anomaly in the transfer, which is (kind of) the Hohmann solution (not exactly since the planets' orbits are not exactly circular or coplanar)
Below the gap are transfers with less than 180 degrees of true anomaly change:
And above the gap is greater than 180 degrees of true anomaly change:
Note that these are for direct transfers. Gravity assists trajectories use different types of analysis (starting with v-infinity matching)