Tens of thousands of people remain trapped in their homes in Thailand's capital and thousands more have fled to shelters after days of intense rain and floods.