Add failing networking interface list sorting test with example provided by #7883. Update sorting logic to properly handle different types and differing array lengths. Fixes #7883