Optional<MetadataVersion> previous() {
        int idx = this.ordinal();
        if (idx > 0) {
            return Optional.of(VERSIONS[idx - 1]);
        } else {
            return Optional.empty();
        }
    }
An array containing all of the MetadataVersion entries.

This is essentially a cached copy of MetadataVersion.values. Unlike that function, it doesn't
allocate a new array each time.
server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java