diff --git a/src/mesh/ItemValue.hpp b/src/mesh/ItemValue.hpp
index ebc5f40511a0be6d1eeb519a0660b494d268f150..d48468f3931a2dc0dc546cb2a2dfee630df9e87e 100644
--- a/src/mesh/ItemValue.hpp
+++ b/src/mesh/ItemValue.hpp
@@ -175,6 +175,13 @@ class ItemValue
   ~ItemValue() = default;
 };
 
+template <typename DataType, ItemType item_type, typename ConnectivityPtr>
+PUGS_INLINE size_t
+size(const ItemValue<DataType, item_type, ConnectivityPtr>& item_value)
+{
+  return item_value.numberOfItems();
+}
+
 template <typename DataType>
 using NodeValue = ItemValue<DataType, ItemType::node>;
 
diff --git a/src/utils/Array.hpp b/src/utils/Array.hpp
index 54786db88592d7371e7b7fa5e9acd0aaec4fffe5..f459821bbbfcdeb591070f5a7c25ffec391d632d 100644
--- a/src/utils/Array.hpp
+++ b/src/utils/Array.hpp
@@ -140,6 +140,13 @@ class [[nodiscard]] Array
   ~Array() = default;
 };
 
+template <typename DataType>
+PUGS_INLINE size_t
+size(const Array<DataType>& array)
+{
+  return array.size();
+}
+
 template <typename DataType, typename... RT>
 PUGS_INLINE Array<DataType>
 encapsulate(const Kokkos::View<DataType*, RT...>& values)
diff --git a/src/utils/SmallArray.hpp b/src/utils/SmallArray.hpp
index b5186a7f6341606a92084fd7ee5521b5d252b4ee..336e6e6ff269dfe7d339becc5695fc7e8eb4eea5 100644
--- a/src/utils/SmallArray.hpp
+++ b/src/utils/SmallArray.hpp
@@ -128,6 +128,13 @@ class [[nodiscard]] SmallArray
   ~SmallArray() = default;
 };
 
+template <typename DataType>
+PUGS_INLINE size_t
+size(const SmallArray<DataType>& array)
+{
+  return array.size();
+}
+
 // map, multimap, unordered_map and stack cannot be copied this way
 template <typename Container>
 PUGS_INLINE SmallArray<std::remove_const_t<typename Container::value_type>>