In this paper, we introduce new viable solutions to the Einstein-Maxwell field equations by incorporating the features of anisotropic matter distributions within the realm of the general theory of relativity (
). To obtain these solutions, we employed the Finch-Skea spacetime, along with a generalized polytropic equation of state (
). We constructed various models of generalized polytropes by assuming different values of the polytropic index, i.e.,
, and
. Next, numerous physical characteristics of these considered models were studied via graphical analysis, and they were found to obey all the essential conditions for astrophysical compact objects. Furthermore, such outcomes of charged anisotropic compact star models could be reproduced in various other cases including linear, quadratic, and polytropic