This paper introduces a novel method to enhance the connectivity of multi-reconfigurable intelligent surface-assisted device-to-device networks, referred to as multi-RIS-assisted D2D networks, through a unique phase shift determination. The proposed method aims to optimize the power-domain array factor (PDAF), targeting specific azimuth angles of reliable user equipments (UEs) and enhancing network connectivity. We formulate an optimization problem that jointly optimizes RIS beamforming design, RIS-aided link selection, and RIS positioning. This problem is a mixed-integer non-binary programming. The optimization problem is divided into two sub-problems, which are solved individually and iteratively. The first sub-problem of RIS-aided link selection is solved using an efficient perturbation method while developing genetic algorithm (GA) to obtain RIS beamforming design. The GA optimizes the RIS phase shift to generate multiple RIS-aided narrowbeams that exhibit significant PDAF towards azimuth angles of interest while minimizing PDAF towards undesired azimuth angles. The second sub-problem of RIS positioning is addressed using the Adam optimizer. Numerical simulations verify the superiority of the proposed scheme in improving network connectivity compared to other schemes, including those utilizing distributed small RISs, each generating one RIS-aided link.