This code you found looks like a great example of arriving at a point where it makes sense to move from parallel arrays to objects.
You have vehicle classes, such as bus / tram / ferry / train – and then you have properties of each, which could be modeled through classes rather than trying to align (I assume?) many lists.