Add custom vector-element formatter
Add custom vector-element formatter

Summary:
This allows a very compact notation for serialization of vectors whose
elements are not serialized using their default encoding.

This is a partial backport of Core [[https://github.com/bitcoin/bitcoin/pull/18021 | PR18021]] [2/4]
https://github.com/bitcoin/bitcoin/pull/18021/commits/abf86243568af380c1384ac4e0bfcdcfd4dab085

Depends on D8742

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8743

Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc