Getting Data from DataAsset

Yeah, TArray is linear search. You need to use another container, like TMap. Something like this:

TMap<FName, TSubclassOf> MyMap;

Fill it up at the beginning and use anywhere.