Thousands of people have been left homeless after the deadliest rains in decades have caused floods and destruction in Peru's coast.