Converts the BIP32 path to a list of integer key indices.
List<int> toList() { return [for (final elem in elems) elem.toInt()]; }