Random Assignment of Indivisible Goods under Constraints