Dynamicaly generate a texture

If i have an array of points with colors attached how can i make this into a texture? that i can pass into a material instance param preferably with blueprints.