How to convert char[12] to byte[6]
Please see the comments in the code:

// SDMacAdress is zero terminated 
// (it should be because you use strcp not strncp)
// char arr[12]; you need one extra byte for the zero
char arr[13];
strcpy(arr, SDMacAddress);

auto getNum = [](char c)
{ 
  // you forgot upercase HEX letters (A-F)
  // don't use sophisticated code
  // the best programmers produce understandable code IMHO at least ;-)
  // perhaps you copied it from the internet 
  // return c &gt; '9' ? c - 'a' + 10 : c - '0'; 

  if ( c &gt;= '0' &amp;&amp; c &lt;= '9' ) return c - '0';
  if ( c &gt;= 'a' &amp;&amp; c &lt;= 'f' ) return 10 + c - 'a';
  if ( c &gt;= 'A' &amp;&amp; c &lt;= 'F' ) return 10 + c - 'A';

  return 0;
};

byte *ptr = ByteMacAddress;

for(char *idx = arr ; *idx ; ++idx, ++ptr )
{
  *ptr = (getNum( *idx++ ) &lt;&lt; 4) + getNum( *idx );
}