I am messing with tcolorboxes as environments to store tables, images, etc. The boxes themselves are numbered by section.box (with the built in tcolorbox numbering) and I had the idea of marking the multiple tabulars/images (counted by \captionof} in each box by the box count, so I would have something like Table 1.3a in Box 1.3, or Figure 2.4b in Box 2.4. Now I've read about \newcounter, \refstepcounter, and \renewcommand (for table or tabular) but I just can't seem to be able to wrap my head around how I would go about achieving this. Please advise.
\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{capt-of}
\usepackage{tcolorbox}
\newtcolorbox[auto counter,number within=section]{cusbox}[2][]{%
before skip=6pt, after skip=6pt,%
halign upper=center,halign lower=center,%
colbacktitle=green!15!white,coltitle=black,colback=green!5!white,colframe=green!75!black,%
leftrule=2mm,rightrule=2mm,titlerule=1mm,%
toptitle=1mm,bottomtitle=1mm,center title,title=Box \thetcbcounter: #2,#1}
\usepackage{lipsum}
\begin{document}
\section{Tcolorbox}
\lipsum[1]
\begin{cusbox}[sidebyside,label=box:table]{The Tables Have Turned}
\begin{tabular}{ccc}
\textbf{one} & \textbf{two} & \textbf{three} \
\hline
5646 & 5651 & 65654 \
56645 & 465 & ksldk
\end{tabular}
\captionof{table}{Actual data (not really)}\label{table:table1}
\tcblower
\begin{tabular}{ccc}
\textbf{one} & \textbf{two} & \textbf{three} \
\hline
5646 & 5651 & 65654 \
56645 & 465 & ksldk
\end{tabular}
\captionof{table}{Actual data (not really)}\label{table:table2}
\end{cusbox}
\lipsum[2]
\end{document}


Table 1.2a,Table 1.2b,Table 1.3c,Table 1.3d, ... If you want to mix figures, tables and whatever in any box, you need to reset all of them, but if you define different boxes for each kind of contents, you only need to reset one counter. It's up to you. – Ignasi Mar 29 '21 at 17:09