Our garden looks a little like an E turned face down if that makes sense. We have several beds running N to S. On the north side, we have one long narrower bed that runs E to W and have our trellised tomatoes in it. It is in the back, so we don't have to worry about it shading anything else.Tall things to the north of the other beds make sense, but everyone else is saying the short sides of the rectangle should be north/south.
My plan was a bed with a trellis on the north, 3 foot, side.