Anything derived from UTexture or UTexture2D would work. UTexture doesn’t provide much help for this kind of use case, so UTexture2D may be a slightly better choice. Note that the actual texture data is not stored in the UTexture, but in a so called FTextureResource. UTexture is merely an Engine friendly container for the low level resource data that is used by the renderer. All the useful stuff is in the texture resource.
You could probably hook into the UTexture2D API (i.e. GetRawMipData()), but a cleaner approach may be to create your own sub-class altogether. For example, take a look at the UMediaTexture and FMediaTextureResources classes, which implement a texture that is populated from streamed video data. Note that the UMediaTexture is rather dumb and only provides an interface to the Engine and to Blueprints. The actual data is in FMediaTextureResource, and the UMediaTexture calls UpdateResource() in the appropriate places to have the texture resource be created and initialized correctly.
Also note that the texture resource object is shared between the Game Thread and the Render Thread, so proper locking must be used before writing to the resource data. See the RHIUnlockTexture2D() and RHILockTexture2D() calls in FMediaTextureResource.
If you want to show the avatar in a Slate or UMG based user interface, then another option would be to create and initialize a Slate image brush instead of a UTexture derived object. You can find an example of this in the NewsFeed module. Take a look at FNewsFeedCache::ProcessIconFile(), which generates a slate image brush from raw byte data.