A developer has scored a $49 million construction loan to build a combined 51 luxury townhomes and affordable rental units in the Monmouth County borough of Allenhurst.