Arp-spoof check in PowerShell
split and spread to variables:

$IP, $SubnetBits = $Subnet -split '/'

your user-function invocation with parentheses is incorrect and works only for single parameter (basically it's interpreted as user-function (param1), the correct syntax is user-function param1 param2 param3 e.g. IPv4toBin $IP
to get a power of 2 use a bitwise left shift:

$imax = (1 -shl $HostBits) - 2

use $array = foreach ($i in 1..$imax) { ... } to generate arrays directly instead of overly verbose for loops and += operator, which recreates the entire array each time
ipconfig may list many networks with empty gateways so you need to account for that or use .NET method (C# source):

$gate_ip = [Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces() |
  where { $_.OperationalStatus -eq 'Up' -and $_.NetworkInterfaceType -ne 'Loopback' }|
  foreach { $_.GetIPProperties().GatewayAddresses } |
  select -expand Address -First 1 |
  select -expand IPAddressToString

Select-String $gate_ip will incorrectly select the header line with no ARP info in case the interface IP address matches the gateway IP e.g. 192.168.1.1 and 192.168.1.176
work with actual numbers instead of binary representation and use bitwise operators:

function Get-IPs($subnet) {     
  $IP, $SubnetBits = $Subnet -split '/'
  [uint32]$imax = (1 -shl (32 - $SubnetBits)) - 2
  [uint32]$baseIP = 0
  foreach ($s in ($IP -split '\.')) {
    $baseIP = ($baseIP -shl 8) + $s
  }
  $baseIP = $baseIP -band -bnot ($imax + 1)
  foreach ($i in 1..$imax) { 
    $IP = $baseIP + $i
    "$($IP -shr 24).$($IP -shr 16 -band 255).$($IP -shr 8 -band 255).$($IP -band 255)"
  } 
}


I'm using implicit output here: a statement that consists only of a value (or an expression) is equal to Write-Output $value_or_expression and the entire collected output is returned from the function without the need for an explicit return