Generate entities from array, a bit bulky