You are given arrays, a list of integer arrays where each array is individually sorted in non-decreasing order (some arrays may be empty), and an integer k.
Return the k smallest elements among all elements of all arrays, in non-decreasing order. Duplicate values count separately; each occurrence is its own element.
Input: arrays = [[1,4,7],[2,5,8],[3,6,9]], k = 5
Output: [1,2,3,4,5]
Explanation: The five smallest elements across all three arrays are 1, 2, 3, 4, and 5.
Input: arrays = [[],[1,3],[2]], k = 2
Output: [1,2]
Explanation: Empty arrays contribute nothing; the two smallest elements overall are 1 and 2.
Input: arrays = [[1,1],[1,2]], k = 3
Output: [1,1,1]
Explanation: The value 1 occurs three times in total, and each occurrence counts.
arrays.length ≤100arrays[i].length ≤104arrays[i][j] ≤109arrays[i] is sorted in non-decreasing order.k ≤N