How to use Esp8266 to communicate between Arduino and Raspberry Pi?
You need to configure RPi as WiFi client and need to configure ESP module which can serve two different URLs. If you send HTTP request to your ESP Server for querying for data. You will receive the request from RPi as a serial data on Arduino, against which you can reply back the values you wanted to send to RPi.

RPi will process those number and will generate another 6 values using 2nd URL and you will have all those 6 values in Arduino over serial communication.