I have a 20” Henry, and in my opinion it hits the sweet spot for most .357 Mag rounds, while still being good for .38 Special. That said, you can get more velocity out of some handloads using slow pistol powders with a 24”, but you are going to actually see a decrease in velocity over the shorter barrels using fast pistol powders, and 38 Special from a 24” will more than likely be about like shooting from a revolver due to the powder being burned up long before it exits the barrel. There are exceptions and workarounds though, like using very slow pistol powders in your .38 special loads.
There isn’t a huge difference in velocity between the 16” and 20”, but there is some. Again, with handloading you can take advantage of the longer barrel with slower powders, but most factory ammo will be close. 38 special will usually max out at 16” or so.
I think I read somewhere once that the optimal length barrel for a .357 magnum was about 18”, but don’t quote me on that because I can’t remember the source.