Introduce a new data type Span, which is an encapsulated pointer + size (like C++20’s std::span or LevelDB’s Slice), and represents a view to a sequence of objects laid out continuously in memory.
The immediate use case is replacing the remaining FLATDATA invocations. Instead of those, we support serializing/deserializing unsigned char Spans (treating them as arrays).
A longer term goal for Spans is making the script execution operate on them rather than on CScript itself. This will allow separate storage mechanisms for scripts.