If you want to program the Pi through the Arduino IDE, this is possible with a little bit of configuration two ways. The first way is online using the Arduino Create cloud tool. Simply follow the getting started link. You'll have to program through the web browser. The second way is setting up a package called RasPiArduino. There is a comprehensive set of directions in that link, which boil down to two main phases which I'll outline in brief.
RasPiArduino step 1: Tell the Arduino IDE that Raspberry Pis exist. In the Arduino IDE hardware folder create a RaspberyPi folder and extract the contents of https://github.com/me-no-dev/RasPiArduino/archive/master.zip into a folder called piduino.
RasPiArduino step 2: Setup the RaspberryPi. Use sudo passwd and set a root password. Then edit /etc/ssh/sshd_config to premit root and password logins. Disable the serial console, I2C, and SPI using raspi-config and disable sound by running sed -i "s/dtparam=audio=on/#dtparam=audio=on/" /boot/config.txt. Run 'apt-get install telnet git' to install telnet and git. Setup the avahi service:
cat > /etc/avahi/services/arduino.service <<EOL
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_arduino._tcp</type>
<port>22</port>
<txt-record>board=bplus</txt-record>
</service>
</service-group>
EOL
service avahi-daemon restart`
Install necessary binaries:
git clone https://github.com/me-no-dev/RasPiArduino.git piduino
chmod +x piduino/tools/arpi_bins/*
cp piduino/tools/arpi_bins/* /usr/local/bin
rm -rf piduino
ln -s /usr/local/bin/run-avrdude /usr/bin/run-avrdude
The last step should be to reboot.