Generic function to merge custom order with default order.
Items specified in customOrder will have higher priority and appear first in the result. Remaining items will follow in the default order.
Duplicate items in customOrder will be deduplicated (first occurrence kept). Items in customOrder that are not in defaultOrder will be ignored.
Array of items with custom priority order
Array of items in default order
Merged order array
Generic function to merge custom order with default order.
Items specified in customOrder will have higher priority and appear first in the result. Remaining items will follow in the default order.
Duplicate items in customOrder will be deduplicated (first occurrence kept). Items in customOrder that are not in defaultOrder will be ignored.