More than 31,000 new homes were built in Sydney in the 12 months to October, the highest annual number of new homes in over four decades, according to new data released by the Department of Planning on Thursday.