Security is one of the major concerns for data communication over wireless sensor networks (WSNs). Dynamic routing algorithms can provide small similarity paths of data delivery between two consecutive transmitted packets, improving data security without adding extra information or control messages. This article illustrates the iteration of the fixed point (FP) of rational contractions and generalized Banach contractions (BC) in the setting of F-metric space (F-MS). It also describes an FP of the said mappings, while restricting the imposition of the contraction only to a subset of the F-MS, the closed ball, rather than executing it on the entire F-MS. The results have been verified and supported by concise examples. Further, the application of the functional equation proved results with randomization is given to find a solution for secure dynamic routing of data transmission in WSNs. The application is a tool to analyze and model a network structure in which sensors can be deployed with high security and low risk in a greater region (sensor field), thus boosting the accuracy.