Hello Malicious
The bible says that God wiped out mankind because it was only evil continually, and the toughts and intents of their heart was also evil continually.
God saved Noah because he found grace in the sight of God and he was the only righteous man. The family of Noah was saved because when god blesses a
person he also Blesses their children if they have any. Also the Bible does Give a promise of God that whoever is saved their family will be saved
also.
God knew ham was Going to sin, They were all still sinners themselves. The flood did not wipe out sin in anyway. But the flood has many spiritual
meanings. Firstly it represents water baptism. It also speaks of the Rapture of christs church. The flood came as a surprise for everyone, except
for Noah and family, But the rest of the world at that time did not know or believe it was coming, so they were not prepared and thats why they all
perished. the connection with this to the NT is the saying of Jesus "I come as a thief in the night".
Noahs Ark also speaks of the fact that not many will be saved or raptured. Only 8 people were saved out of the millions that were alive at the
time. So as in the last days Jesus said "Straight is the gate and narrow is the way, which leadeth unto life, and few be there that find it".
I hope this helps in some way

.