I've been thinking recently about patterns between onyomi and their respective Chinese counterparts (as presumably existed in middle Chinese and are now reflected across modern Chinese dialects). Japanese certainly does reflect a lot of the consonant endings that existed in middle Chinese that have been lost in some dialects (particularly Mandarin, which only preserves -r, -n and -ng as consonant finals) (cf. 六 - Mandarin liù, Cantonese luk6, Japanese roku) (cf. 七 - Mandarin qī, Cantonese cat1, Japanese shichi)
I was wondering in particular about the phenomenon regarding the -p final and the -ng final, both of which seem to be widely represented in modern Japanese by the elongation of the vowel sound (cf. 十 - Mandarin shí, Cantonese sap6, Japanese jū) (cf. 零 - Mandarin líng, Cantonese ling4, Japanese rē/rei). Is there any evidence of earlier Japanese having -ng as a valid phoneme, and if not, is there any particular reason why Japanese would have borrowed these elongated-vowel readings as substitutes for the -ng and the -p finals (especially in the case of the latter, which seems like it would be replicable by Japanese phonology)