Possible to loop through all blueprint sub-classes?

I’m a little confused, where would I write this code?