TArrray to Texture2D in Unreal

I have a TArray of type FColor (I got it from the viewport) and I want to change that to a Texture2D object I can’t find anything in the API’s and I’m new to Unreal.

Thanks