Linux/Shell script - How to compare 2 arrays based on patterns and get the differences

I have

FILE 1 (This file has all master columns/headers)

A|B|C|D|E|F|G|H|STATUS

FILE 2

A|C|F|I|OFF_STATUS
3|4|5|4|Y
6|7|8|5|Y

Below command give me all headers of FILE 2 into array2.txt file

paste <(head -1 FILE2.txt | tr '|' '\n')>array2.txt

So I would like to compare FILE1.txt (ARRAY1) to ARRAY2.txt and get columns which does not exists in ARRAY2.txt

Thank you all
Jay

using awk:

awk -F\| '
FNR == NR { col[$0]; next}
{
 for(i=1;i<=NF;i++)
  if(!($i in col)) {
    printf "%s%s",sep, $i;
    sep="|"
 }
 printf "\n"
}
' array2.txt FILE1

Using bash script:

#!/bin/bash
IFS=\|
A1=( $(<FILE1) )
IFS=$' \t\n'
A2=( $(<array2.txt) )

for((i=0;i<${#A1[@]};i++))
do
  for((j=0;j<${#A2[@]};j++))
  do
      [ "${A1}" = "${A2[j]}" ] && continue 2
  done
  printf "%s%s" "$SEP" "${A1}"
  SEP=\|
done
printf "\n"

Try also

IFS="|" read -a A1 <file1
IFS="|" read -a A2 <file2
IFS=$'\n'
<<< "${A1
[*]}$IFS${A2
[*]}$IFS${A2
[*]}" sort | uniq -u
B
D
E
G
H
STATUS