Actually, it sounds like you want to find the smallest radius necessary to patch the raster. That can be obtained as the maximum of the Euclidean distance to the data cells.
To count the number of NoData cells in any raster, compute an indicator of those cells and sum it. The NoData indicator in ArcGIS is called IsNull (as shown in your sample code): by definition, it returns 1 at NoData cells and 0 elsewhere.
I assume that there is only 1 pixel per polygon that has a maximum value.
1. Find Maximum Value
... use the shapefile to look at the Flow Accumulation Raster and
identify the location of the maximum value in each basin.
To solve this task (find the maximum pixel value in each polygon) you can use Zonal Statistics (Spatial Analyst).
in_zone_data = your polygon file
zone_field = basin number
in_value_raster = flow accumulation raster
statistics_type = MAXIMUM
2. Convert basin polygon to raster
pixel value = basin number
3. Find location of the maximum value
Use Con (Spatial Analyst) to find the location of the maximum in each basin.
con ( <raster result from step 1> == <raster flow accumulation>, <raster from step 2>, 0)
The result raster contains one pixel for each basin. The pixel value shows the basin number.
4. Convert raster to point
convert result raster from step 3 to point file (only for pixel values not 0)
5. calculate lat/lon for result from step 4
Best Answer
The answer can be obtained by combining an indicator grid of the top 1% of values with grids of latitude and longitude. The trick lies in creating this indicator grid, because ArcGIS (still! after 40 years!) does not have a procedure to rank raster data.
One solution for floating-point rasters is iterative, but mercifully quick. Let n be the number of data cells. The empirical cumulative distribution of values consists of all pairs (z, n(z)) where z is a value in the grid and n(z) is the number of cells in the grid with values less than or equal to z. We get a curve connecting (-infinity, 0) to (+infinity, n) out of the sequence of these vertices ordered by z. It thereby defines a function f, where (z, f(z)) always lies on the curve. You want to find a point (z0, 0.99*n) on this curve.
In other words, the task is to find a zero of f(z) - (1-0.01)*n. Do this with any zero-finding routine (that can handle arbitrary functions: this one is not differentiable). The simplest, which is often efficient, is guess-and-check: initially you know z0 lies between the minimum value zMin and the maximum zMax. Guess any reasonable value strictly between these two. If the guess is too low, set zMin = z0; otherwise set zMax = z0. Now repeat. You will quickly converge to the solution; you're close enough when zMax and zMin are sufficiently close. To be conservative, choose the final value of zMin as the solution: it might pick up a few extra points that you can discard later. For more sophisticated approaches, see Chapter 9 of Numerical Recipes (the link goes to an older free version).
Looking back at this algorithm reveals you need to perform only two kinds of raster operations: (1) select all cells less than or equal to some target value and (2) count selected cells. Those are among the simplest and fastest operations around. (2) can be obtained as a zonal count or by reading one record from the attribute table of the selection grid.