This paper explores optimal configuration of both dimension and layout of Wave Energy Converter (WEC) arrays with full interaction and exact hydrodynamics. Arrays in this research contain devices that operate in heave mode and also devices that operate in pitch mode. The hydrodynamic interaction between buoys in the array is studied and higher q-factors is achieved using optimization. This study includes optimization results for arrays of only heave-mode buoys and hybrid arrays of 2 types of devices that has been mentioned above. Each of the heave-mode arrays contain 3, 5, and 7 buoys respectively while the hybrid arrays have arbitrarily selected configurations of the type of devices for comparison. This simulation uses impedance matching control which provides theoretical maximum level of power. The results indicates it is essential to optimize array layout simultaneously with the dimension of each buoy. Meanwhile, the mode of motion of the devices in an array is a significant factor in designing the array under complex ocean environment, and better performance of the array is achieved when the configuration is selected properly.