You can buy galvanised brackets that you use to replace broken arris rails. They are for wooden posts but they simply nail, or screw, into the posts and the rails are nailed to them.
It is possible to trim the rails to fit in but it's difficult to get a good tight fixing