Typically, truss elements are used for such applications but you could also use beams. The difference is that beams have bending stiffness while trusses don’t. The connection can indeed be tricky and might be easier with beams than with trusses. Tie constraint should handle the connection. Check this thread for some examples: