This not correct (at least without something approaching dependent types) because maps do not guarantee that if n is a key, pred(n) is also a key, and there is no way to express a refinement of the map interface which provides this guarantee. Iteration introduces some order, it might even be a non-arbitrary order (BTreeMap is an ordered map, by the way), but it does not mean that the keys in the map are all of the values in the range 0..len.
These are fundamentally different interfaces. It does not mean anything to ‘push’ to a map, and you can not insert at arbitrary indices greater than the length of a sequence.
Serialization, especially to formats like JSON, is a very obvious use case for the ability to provide blanket impls for both sequences and maps.