what is maximum numbers of files T4 can access easily?? as it is good with 100 .wav file
As far as I'm aware, there's no specific limit to the number of files you can put on your SD card, and no reason the Teensy would be unable to access any file. Obviously there
are practical limits, depending on the likely file sizes, but you've said nothing about that so it's impossible to help there.
what is maximum numbers of files names should be used in store in array?? as i write 256 in code
That depends on what you're doing, and there's no "should" about that.
Say you're providing a huge number of WAV samples: typically you can't load very many at once even into PSRAM, though you could stream them from SD on demand. But that demand then comes (presumably) from a user. Are you going to present a list of 100,000 files to pick from? That
would cause problems with RAM on the Teensy, but you surely wouldn't consider it as a sensible user interaction... You might put related files in folders, provide a way to navigate folders, and present only the files in the selected folder for selection. 47 folders, each with 47 sub-folders, each with 47 files, gives you 103,823 files.
Say further you're building a sampled drum machine. You might decide to have a kit of 32 sounds, each individually selected, so you only need to retain those 32 file names in RAM.
Personally, I would avoid having any rigid limit for ephemeral lists of file or folder names used only during user interaction. Using something like
std::array, populated from a scan of the "current folder", is one approach, but you need to take care to ensure the array and file names are deleted when the user interaction is done, or you'll get a memory leak. As it is, you're likely to get a certain amount of heap fragmentation, which you'll need to keep an eye on.
Another approach would be to fix the number of filenames loaded (as you originally proposed), with the count decided by the use case, for example 20 file names because that's all that will fit on the screen at one time.
In one sketch I had 264 file names and part of their data filling most of the PSRAM - that was a 3-layer 88-note set of piano samples, which took 483MB of the SD card. The names only took up about 7kB of that space, though.