Padding Arrays

Foundation framework already provides a great API to achieve this with Strings:
https://developer.apple.com/documentation/foundation/nsstring/1416395-stringbypaddingtolength?language=Swift

Do you have a real-life example where else this might be useful for non-string arrays?