You can show or hide filename extensions for any file you choose, or a number of different files all at once. To do this for a single file, simply select the file in Finder and choose Get Info from the File menu, or by right-clicking on the file and choosing Get Info from the pop-up menu.
This brings up the information pane, which contains a checkbox that you can check or uncheck to toggle the visibility of the file's extension:

To do this for multiple files all at once, it's best not to use the Get Info menu item, as—rather annoyingly—this will bring up multiple information panes all at once. Instead, press ⌘+⌥+I (Cmd+Alt+I) to bring up a single information pane that summarises the information for all of the selected files at once. This pane contains the same checkbox, which you can use to adjust the setting of all the files in one go.
It is possible to search for files in Finder based on whether or not their extensions are visible. To do this, open a Finder window and navigate to the folder which you wish to search (the search will also include any subfolders this folder contains). Start typing a search string (it doesn't matter what for now). When you do, the following bar will appear (I was searching in a folder called "Screenshots"):

Now press the '+' button on the right, and the bar will expand into this:

Press the drop-down menu on the left, where it says Name. This reveals a list of different search criteria. The very last item is Other.... Choose this one to bring up a dialog box that presents you with all the possible search criteria against which one can search for files from a Finder window. One of these criteria will be the one you're after:

Check the checkbox on the right to make it available in the drop-down menu from before and press OK. Now choose this option and the desired value, i.e.whether you want to search for files with extensions that are hidden ("Yes"), visible ("No"), or either ("Any"), and clear the text from search field or type in some additional search parameter to narrow your results. This should populate the window with a list of files that match these criteria.
Finally, for completeness, it is also possible to do this through AppleScript, though I suspect you no longer need this option. But, in case you do, this line of AppleScript will fetch all the files in any given folder that have hidden extensions:
tellapplication"Finder"toget (everyfilein (POSIX file"/Users/CK/Desktop/"asalias) whoseextension hiddenistrue) asalias list
And this line will make the extensions of every file on the desktop visible:
tellapplication"Finder"tosetextension hiddenofeveryfilein (POSIX file"/Users/CK/Desktop/"asalias) tofalse