the clan of the house of David … Nathan … Levi … Shimei: Zechariah might be referring to the royal families (David and his son Nathan; see 1 Chronicles 14:4) and the priestly families (Levi and his grandson Shimei; see Numbers 3:16–18; 1 Chronicles 6:16–17). Alternatively, the four families might represent the four main leadership roles in Old Testament times:
the king (David, 1 Samuel 16:1–13),
the prophet (Nathan, 2 Samuel 7:2),
the priest (Levi, Deuteronomy 33:8–11), and
the tribal leader (Shimei, 1 Kings 1:8; 4:18).
The first interpretation aligns with Zechariah’s focus on the Branch that will be both king and priest (see Zechariah 6:12–13).
all the remaining clans: This separation shows the depth and completeness of Israel’s mourning.