Crystal structure of Tb5Ni2In4 and Y5Ni2In4, and magnetic properties of Dy5Ni2In4