California, with the biggest US homeless population, has allotted $400 million to help convert commercial buildings for residential use.