I wanted to know if it is possible to cast a TMap having the same key name name but the container having a different type of pointer compared to the one initialized.
You can only cast the result of the lookup and not the TMap itself. You could write a template function to do this so it looks more natural.
template< class TYPE > TYPE* MapCast(TMap<Fname, uint8*>& Map, FName Key) { return (TYPE*)Map[SlotName]; }
BTW, be careful when creating FNames as you can trigger memory leaks that way by an ever growing array of names. Better to construct with the NAME_Find flag so that it doesn’t always create if it is missing.