Hello: Here’s how I’d do it: Leave the existing lined nipples (unless you want to install a curved dip tube and a “combo” anode in the hot port. That is simply an anode with the lined nipple on top. From the lined nipples, go directly to flex connectors. They can be stainless, or stainless over-braid or copper. I like copper, particularly if it has true dielectrics built into the ends. This sort of dielectric is better than the normal version as it puts no steel into the water. Most plumbers are not fond of normal dielectrics as they just cause trouble and fail in various unpleasant ways.
Use 24″ flex connectors to make as much of the heat traps as possible. From there use a 3″ brass nipple to transition to your ball valve/s. I like to put a shut off on the hot side if the heater is under living space. This allows you to work on the heater without draining the building. If the house is one story with the heater in that level, there is no need for the hot side valve. On the hot side if you don’t use a valve, screw the flex connector directly to a 3/4″ copper male adapter. This solders onto copper pipe. If soldering is out, then using Shark Bite is OK if the connection is in a plainly visible location and not covered with insulation. All flex connectors should be re-tightened after six months as the rubber shrinks a bit with heat.
Just put the relief valve where it goes, on the side or top of the tank. Do hook it up to a drain line that runs to a safe spot using a flex connector and brass nipple at the outlet of the relief valve. It makes testing the valve much easier. The anode will protect things. As for the drain, I use a lined steel nipple between the valve and tank to prevent rusting at the tank. I’ve had good results for years using this approach. 😉