I don't know exactly what these brackets would look like but one of the biggest lines of brackets comes from Simpson Strong-Tie and you might find some ideas by looking through their offerings. For example, take a look at this page and try selecting Solid Sawn Lumber Connectors or Straps and Ties on the left, and you will see the kinds of things that are available. I'm sure there are similar products from other manufacturers as well.
That said, the strength of a 2 x 4 rafter that spans the whole distance from wall to ridge is almost certainly higher than the strength of one that has been “patched” like this (the term I’m used to for putting two framing members side by side like you describe is “sistering”). And the structural integrity of your roof may depend on that higher strength -- 2x4s are not that robust as rafters to start with.
Could you put in new rafters sistered up to the old ones but that span the whole distance from ridge to wall, so that each place where you do that you are not relying on the old rafters at all?
If not I have no idea how you would determine what is adequate to support the roof load. There might be others here with contracting experience who know of a rule of thumb for this, but otherwise you probably need to get advice from a structural engineer. That would give you the assurance that whatever you do will work for the loads in your area, particularly the weight of the roof itself and any anticipated snow load.